diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fc5181..253fd7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,12 @@ jobs: uses: actions/cache@v4 with: path: ~/.m2/repository - key: maven-${{ hashFiles('pom.xml') }} + key: tests-maven-${{ hashFiles('pom.xml') }} + + - uses: s4u/maven-settings-action@v3.0.0 + with: + servers: | + [{"id": "mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}] - name: Initialize CodeQL uses: github/codeql-action/init@v3 @@ -38,8 +43,8 @@ jobs: languages: java queries: security-and-quality - - name: Build - run: mvn -B verify + - name: Download Ontology and Build + run: mvn -Pdownload-ontology -B verify - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 @@ -94,9 +99,10 @@ jobs: output: trivy-results.sarif severity: 'CRITICAL,HIGH' timeout: '15m0s' + skip-files: 'app/ontology/*' env: - # https://aquasecurity.github.io/trivy/v0.55/docs/references/troubleshooting/#github-rate-limiting - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2 + TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1 - name: Upload Trivy Scan Results to GitHub Security Tab uses: github/codeql-action/upload-sarif@v3 @@ -138,6 +144,14 @@ jobs: - name: Load torch Image run: docker load --input /tmp/torch.tar + - uses: s4u/maven-settings-action@v3.0.0 + with: + servers: | + [{"id": "mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}] + + - name: Download Ontology + run: mvn -Pdownload-ontology -B -DskipTests package + - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/.gitignore b/.gitignore index 89d4afe..c18c325 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ log/ target/ output +ontology dependencies package.json fhirpkg.lock.json diff --git a/CHANGELOG.md b/CHANGELOG.md index e46ca6d..e1ce42b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), + +## [UNRELEASED] - yyyy-mm-dd + +### Added +### Changed +### Deprecated +### Removed +### Fixed +### Security + +## [v1.0.0-alpha.1] - 2024-10-21 + +### Added +- **Open Id Connect Authenticatoon** +- **Filter Resources by Consent selected in CCDL** +- **Expand concept code filter** +- **CQL cohort execution** +- **Ontology integration** + + ## [v1.0.0-alpha] - 2024-09-19 ### Added @@ -11,19 +34,4 @@ - **Multi FHIR Profile Handling**: Added the ability to handle multiple FHIR profiles per resource, selecting the first known profile greedily. - **Resource Redaction and Copying**: Introduced basic functionality for redacting and copying patient resources. -### Changed --None. - - -### Deprecated -- None. - -### Removed -- None. - -### Fixed -- None. - -### Security -- None. diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000..a9d17b6 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,16 @@ +# Development + +## Release Checklist + +* create a release branch called `release/v` like `release/v1.1.0` +* rename every occurrence of the old version, say `1.0.0` or `1.1.0-SNAPSHOT` into the new version, say `1.1.0` +* update the CHANGELOG based on the milestone +* create a commit with the title `Release v` +* create a PR from the release branch into the main branch +* merge that PR (after proper review) +* create and push a tag called `v` like `v1.1.0` on the main branch at the merge commit +* create a new branch called `new-dev` on top of the release branch +* change the version in the POM to the next SNAPSHOT version which usually increments the minor version, e.g. `1.2.0-SNAPSHOT` +* merge the `new-dev` branch back into develop +* create release notes on GitHub +* delete the release-branch and the new-dev branch after they have been successfully merged \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index bfa5298..776d5aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,15 +11,18 @@ ENV TRUSTSTORE_PATH=/app/truststore ENV TRUSTSTORE_FILE=self-signed-truststore.jks COPY target/torch.jar /app/ -COPY structureDefinitions app/structureDefinitions +COPY structureDefinitions /app/structureDefinitions +COPY mappings /app/mappings +COPY ontology /app/ontology + +RUN mkdir -p $CERTIFICATE_PATH $TRUSTSTORE_PATH RUN mkdir /app/output -RUN chown -R 1001:1001 /app +RUN chown -R 1001:1001 /app COPY docker-entrypoint.sh / RUN chmod +x /docker-entrypoint.sh - WORKDIR /app USER 1001 diff --git a/README.md b/README.md index 27de758..7838088 100644 Binary files a/README.md and b/README.md differ diff --git a/docker-compose.yml b/docker-compose.yml index 8f74051..2231c39 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: ports: - "8082:8080" volumes: - - "data-store-data:/app/output" + - "data-store-data:/app/data" torch-flare: image: ghcr.io/medizininformatik-initiative/flare:2.4.0-alpha.1 ports: @@ -30,7 +30,7 @@ services: restart: unless-stopped image: nginxinc/nginx-unprivileged:1.25.5-alpine ports: - - ${PORT_TORCH_NGINX:-127.0.0.1:8080}:8080 + - ${PORT_TORCH_NGINX:-127.0.0.1:80}:8080 volumes: - ./nginx.conf.template:/etc/nginx/nginx.conf.template - ./start-nginx.sh:/start-nginx.sh @@ -46,7 +46,9 @@ services: - ${PORT_TORCH:-127.0.0.1:8086}:8080 environment: SERVER_PORT: 8080 - TORCH_PROFILE_DIR: /app/StructureDefinitions + TORCH_PROFILE_DIR: /app/structureDefinitions + TORCH_MAPPING_CONSENT: /app/mappings/consent-mappings_fhir.json + TORCH_MAPPING_CONSENT_TO_PROFILE: /app/mappings/profile_to_consent.json TORCH_FHIR_URL: http://torch-data-store:8080/fhir TORCH_FLARE_URL: http://torch-flare:8080 TORCH_RESULTS_DIR: /app/output @@ -56,6 +58,10 @@ services: NGINX_FILELOCATION: http://localhost:80 TORCH_BATCHSIZE: 100 TORCH_MAXCONCURRENCY: 4 + TORCH_MAPPINGSFILE: /app/ontology/mapping_cql.json + TORCH_CONCEPTTREEFILE: /app/ontology/mapping_tree.json + TORCH_USECQL: false + volumes: - "torch-data-store:/app/output" # Shared volume with torch-nginx - ./structureDefinitions:/app/StructureDefinitions diff --git a/mappings/consent-mappings_fhir.json b/mappings/consent-mappings_fhir.json new file mode 100644 index 0000000..e69de29 diff --git a/mappings/profile_to_consent.json b/mappings/profile_to_consent.json new file mode 100644 index 0000000..b5aacba --- /dev/null +++ b/mappings/profile_to_consent.json @@ -0,0 +1,148 @@ +{ + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationStatement": "MedicationStatement.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/medikationsliste": "List.date", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationRequest": "authoredOn", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/Medication": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationAdministration": "MedicationAdministration.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-blut-preduktal-durch-pulsoxymetrie": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-kern": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-rektal": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-trommelfell": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorische-sauerstofffraktion-eingestellt": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/extrakorporales-verfahren": "Procedure.performed[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/systemischer-vaskulaerer-widerstandsindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutfluss-cardiovasculaeres-geraet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/horowitz-in-arteriellem-blut": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dynamische-kompliance": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontanes-atemzugvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/mechanische-atemfrequenz-beatmet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-achsel": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutdruck-generisch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/maximaler-beatmungsdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergewicht-percentil-altersabhaengig": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/exspiratorischer-sauerstoffpartialdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffgasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/zentralvenoeser-blutdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/einstellung-einatmungszeit-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemzugvolumen-waehrend-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/parameter-von-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungszeit-hohem-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/eingestellter-inspiratorischer-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/einstellung-ausatmungszeit-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/parameter-von-extrakorporalen-verfahren": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dauer-haemodialysesitzung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-stirn": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/ionisiertes-kalzium-nierenersatzverfahren": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-blut-postduktal-durch-pulsoxymetrie": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorische-sauerstofffraktion": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-gelenk": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/kopfumfang": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemfrequenz": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-herzindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumen-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergroesse": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-arteriellen-blut-durch-pulsoxymetrie": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/substituatvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemwegsdruck-bei-null-expiratorischem-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/zeitverhaeltnis-ein-ausatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungsvolumen-pro-minute-maschineller-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/monitoring-und-vitaldaten": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-nasen-rachen-raum": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontane-atemfrequenz-beatmet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalarterieller-wedge-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/rechtsventrikulaerer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/periphere-artierielle-sauerstoffsaettigung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksatrialer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-halswirbelsaeule": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/icu-device": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-generisch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/druckdifferenz-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorischer-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalvaskulaerer-widerstandsindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/unterstuetzungsdruck-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemwegsdruck-bei-mittlerem-expiratorischem-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/venoeser-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergroesse-percentil": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-vaginal": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemzugvolumen-einstellung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/rechtsatrialer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/mittlerer-beatmungsdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/positiv-endexpiratorischer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/herzzeitvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergewicht": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-speiseroehre": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/substituatfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/endexpiratorischer-kohlendioxidpartialdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-leiste": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/devicemetric-eingestellte-gemessene-parameter-extrakorporale-verfahren": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumenindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmung": "Procedure.performed[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungszeit-niedrigem-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontanes-mechanisches-atemzugvolumen-waehrend-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalarterieller-blutdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontane-mechanische-atemfrequenz-beatmet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/haemodialyse-blutfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-nasal": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/puls": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dauer-extrakorporaler-gasaustausch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-harnblase": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/ideales-koerpergewicht": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-brust": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-atemwege": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-lendenwirbelsaeule": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/exspiratorischer-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/arterieller-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/herzfrequenz": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-herzindex-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutflussindex-extrakorporaler-gasaustausch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-schlagvolumenindex-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-unter-der-zunge": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-blut": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutfluss-extrakorporaler-gasaustausch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/intrakranieller-druck-icp": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/devicemetric-eingestellte-gemessene-parameter-beatmung": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-brustwirbelsaeule": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-herzzeitvolumen-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Substance": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Organization": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Specimen": "Specimen.collection.collected[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/SpecimenCore": "Specimen.collection.collected[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure": "Procedure.performed[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Vitalstatus": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/PatientPseudonymisiert": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/ResearchSubject": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Patient": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Todesursache": "Condition.recordedDate", + "http://fhir.de/ConsentManagement/StructureDefinition/DocumentReference": "DocumentReference.date", + "http://fhir.de/ConsentManagement/StructureDefinition/TemplateFrame": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Consent": "Consent.dateTime", + "http://fhir.de/ConsentManagement/StructureDefinition/TemplateModule": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Domain/Organization": "", + "http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireComposed": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Domain/ResearchStudy": "", + "http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireResponse": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Provenance": "Provenance.recorded", + "http://fhir.de/ConsentManagement/StructureDefinition/Patient": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-diagnose/StructureDefinition/Diagnose": "Condition.recordedDate", + "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/genotyp": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/medikationsempfehlung": "Task.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/empfohlene-folgemassnahme": "Task.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/familienanamnese": "FamilyMemberHistory.date", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/ergebnis-zusammenfassung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/molekulargenetischer-befundbericht": "DiagnosticReport.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/diagnostische-implikation": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/anforderung-genetischer-test": "ServiceRequest.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/mikrosatelliteninstabilitaet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/mutationslast": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/variante": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/therapeutische-implikation": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/untersuchte-region": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/polygener-risiko-score": "RiskAssessment.occurrence[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ServiceRequestLab": "ServiceRequest.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab": "DiagnosticReport.effective[x]" +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index dc906c9..45a43a4 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ de.medizininformatikinitiative torch - 1.0.0-alpha + 1.0.0-alpha.1 21 @@ -21,6 +21,7 @@ 21 UTF-8 6.2.5 + v3.0.0-alpha @@ -140,8 +141,135 @@ test + + de.medizininformatik-initiative + sq2cql + v0.5.0-alpha.1 + + + + org.springframework.security + spring-security-oauth2-client + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + + + + download-ontology + + false + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + + delete-ontology-directories + generate-resources + + exec + + + rm + + -rf + ontology + + + + + + create-ontology-directory + generate-resources + + exec + + + mkdir + + ontology + + + + + + download-ontology-mapping + generate-resources + + exec + + + curl + + -L + https://github.com/medizininformatik-initiative/fhir-ontology-generator/raw/${ontology-tag}/example/fdpg-ontology/mapping.zip + -o + ontology/mapping.zip + + + + + + unpack-ontology-mapping + generate-resources + + exec + + + unzip + + -jod + ontology/ + ontology/mapping.zip + + + + + + delete-zip-files + generate-resources + + exec + + + rm + + ontology/mapping.zip + + + + + + + + + + + + + mii + GitHub Medizininformatik-Initiative Apache Maven Packages + https://maven.pkg.github.com/medizininformatik-initiative/* + + true + + + true + + + + torch diff --git a/src/main/java/de/medizininformatikinitiative/flare/Either.java b/src/main/java/de/medizininformatikinitiative/flare/Either.java deleted file mode 100644 index a9f9009..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/Either.java +++ /dev/null @@ -1,201 +0,0 @@ -package de.medizininformatikinitiative.flare; - -import java.util.function.BiFunction; -import java.util.function.BinaryOperator; -import java.util.function.Function; - -import static java.util.Objects.requireNonNull; - -/** - * A union type of either a {@link Either.Left left} or a {@link Either.Right right} value. - * - *

Usually Right denotes the happy path and Left denotes the exception case. Operations like {@link #map(Function) - * map} and {@link #flatMap(Function) flatMap} are right-based. So they operate on the right value and shortcut in the - * case the Either is {@link Either.Left left}. - * - * @param the type of the left value - * @param the type of the right value - */ -public sealed interface Either permits Either.Left, Either.Right { - - /** - * Wraps the given value into a {@link Either.Left Left Either}. - * - * @param val the value to wrap - * @param the type of the left value - * @param the type of the right value - * @return a Left Either - */ - static Either left(L val) { - return new Left<>(val); - } - - /** - * Wraps the given value into a {@link Either.Right Right Either}. - * - * @param val the value to wrap - * @param the type of the left value - * @param the type of the right value - * @return a Right Either - */ - static Either right(R val) { - return new Right<>(val); - } - - /** - * Lifts the function {@code f} into the {@code Either} type. - * - *

The lifted function will return it's argument if it is {@link Either.Left left} without calling {@code f}, - * also called shortcutting. In case the argument is {@link Either.Right right}, the function will call {@code f} - * with the {@link Either.Right#val right value} and return the result wrapped into a {@link Either.Right - * Right Either}. - * - *

Applying the lifted function to an {@code Either} is the same as calling {@link #map(Function) map} with - * {@code f}. - * - * @param f the function to lift - * @param the left type of all Eithers - * @param the argument type of {@code f} - * @param the result type of {@code f} - * @return a function that takes an {@code Either} instead of a {@code T} and returns an {@code Either} - * instead of a {@code R} - */ - static Function, Either> lift(Function f) { - requireNonNull(f, "f"); - return either -> either.map(f); - } - - /** - * Lifts the function {@code f} into the {@code Either} type. - * - *

The lifted function will return one of it's arguments if it is {@link Either.Left left} without calling - * {@code f}, also called shortcutting. In case both arguments are {@link Either.Right right}, the function will - * call {@code f} and return the result wrapped into a {@link Either.Right Right Either}. - * - *

Lifting an existing function is useful in - * {@link java.util.stream.Stream#reduce(Object, BiFunction, BinaryOperator) reducing} streams of eithers. - * - * @param f the function to lift - * @param the left type of all Eithers - * @param the type of the first argument of {@code f} - * @param the type of the second argument of {@code f} - * @param the result type of {@code f} - * @return a function that takes an {@code Either} and an {@code Either} instead of a {@code T} and an - * {@code U} and returns an {@code Either} instead of a {@code R} - */ - static BiFunction, Either, Either> lift2(BiFunction f) { - requireNonNull(f, "f"); - return (eitherA, eitherB) -> eitherA.flatMap(a -> eitherB.map(b -> f.apply(a, b))); - } - - /** - * Lifts the binary operator {@code op} into the {@code Either} type. - * - *

The lifted operator will return one of it's arguments if it is {@link Either.Left left} without calling - * {@code op}, also called shortcutting. In case both arguments are {@link Either.Right right}, the operator will - * call {@code op} and return the result wrapped into a {@link Either.Right Right Either}. - * - *

Lifting an existing operators is useful in {@link java.util.stream.Stream#reduce(BinaryOperator) reducing} - * streams of Eithers. - * - * @param op the operator to lift - * @param the left type of all Eithers - * @param the type of {@code op} - * @return an operator that takes two {@code Either}s of two {@code T}s and returns an {@code Either} - * instead of a {@code T} - */ - static BinaryOperator> liftBinOp(BinaryOperator op) { - requireNonNull(op, "op"); - return (eitherA, eitherB) -> eitherA.flatMap(a -> eitherB.map(b -> op.apply(a, b))); - } - - /** - * If this {@code Either} is {@link Either.Right right}, returns the result of applying the given mapping function - * to the {@link Either.Right#val right value} wrapped into a {@link Either.Right Right Either}, otherwise returns - * the left {@code Either} unchanged. - * - * @param mapper the mapping function to apply to a right value - * @param the type of the mapped right value - * @return a mapped right value wrapped in a {@code Right Either} or an unchanged left {@code Either} - * @throws NullPointerException if the mapping function is {@code null} - */ - Either map(Function mapper); - - /** - * If this {@code Either} is {@link Either.Right right}, returns the result of applying the given mapping function - * to the {@link Either.Right#val right value}, otherwise returns the left {@code Either} unchanged. - * - * @param mapper the mapping function to apply to a right value - * @param the type of the mapped right value - * @return a mapped right value or an unchanged left {@code Either} - * @throws NullPointerException if the mapping function is {@code null} - */ - Either flatMap(Function> mapper); - - /** - * Maps both, the right and the left value to a value of a common type {@code T}. - * - * @param leftMapper the mapping function that is applied to the left value - * @param rightMapper the mapping function that is applied to the right value - * @param the type of the return value - * @return the return value of either either applying the left value to the {@code leftMapper} or the right value to - * the {@code rightMapper} - * @throws NullPointerException if one of the mapping functions is {@code null} - */ - T either(Function leftMapper, Function rightMapper); - - /** - * A container representing the left value. - * - * @param the type of the left value - * @param the type of the right value - */ - record Left(L val) implements Either { - - @Override - @SuppressWarnings("unchecked") - public Either map(Function mapper) { - return (Either) this; - } - - @Override - @SuppressWarnings("unchecked") - public Either flatMap(Function> mapper) { - return (Either) this; - } - - @Override - public T either(Function leftMapper, Function rightMapper) { - requireNonNull(leftMapper, "left mapper"); - return leftMapper.apply(val); - } - } - - /** - * A container representing the left value. - * - * @param val the right value - * @param the type of the left value - * @param the type of the right value - */ - record Right(R val) implements Either { - - @Override - public Either map(Function mapper) { - requireNonNull(mapper); - return new Right<>(mapper.apply(val)); - } - - @Override - public Either flatMap(Function> mapper) { - requireNonNull(mapper, "mapper"); - return mapper.apply(val); - } - - @Override - public T either(Function leftMapper, Function rightMapper) { - requireNonNull(rightMapper, "right mapper"); - return rightMapper.apply(val); - } - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/Util.java b/src/main/java/de/medizininformatikinitiative/flare/Util.java deleted file mode 100644 index 6ca035c..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/Util.java +++ /dev/null @@ -1,114 +0,0 @@ -package de.medizininformatikinitiative.flare; - -import com.fasterxml.jackson.databind.ObjectMapper; -import de.medizininformatikinitiative.flare.model.mapping.Mapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.mapping.TermCodeNode; -import de.medizininformatikinitiative.flare.model.sq.ContextualTermCode; - -import java.io.BufferedInputStream; -import java.io.ByteArrayOutputStream; -import java.io.FileInputStream; -import java.nio.charset.StandardCharsets; -import java.time.Clock; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; - -import static java.util.function.Function.identity; - -public interface Util { - - static List add(List xs, U x) { - return Stream.concat(xs.stream(), Stream.of(x)).toList(); - } - - /** - * In Clojure this is: - *

-     * (reduce
-     *   (fn [result rows]
-     *     (reduce
-     *       (fn [new-result result-rows]
-     *         (reduce
-     *           (fn [new-result-row x]
-     *             (conj new-result-row (conj result-rows x)))
-     *           new-result
-     *           rows))
-     *       []
-     *       result))
-     *   [[]]
-     *   matrix)
-     * 
- */ - static List> cartesianProduct(List> matrix) { - var result = List.of(List.of()); - for (var rows : matrix) { - result = cartesianProductHelper1(result, rows); - } - return result; - } - - private static List> cartesianProductHelper1(List> result, List rows) { - var newResult = List.>of(); - for (var resultRows : result) { - newResult = cartesianProductHelper2(newResult, resultRows, rows); - } - return newResult; - } - - private static List> cartesianProductHelper2(List> newResult, List resultRows, List rows) { - for (var x : rows) { - newResult = add(newResult, add(resultRows, x)); - } - return newResult; - } - - static List concat(List as, List bs) { - return Stream.concat(as.stream(), bs.stream()).toList(); - } - - static double durationSecondsSince(long startNanoTime) { - return ((double) (System.nanoTime() - startNanoTime)) / 1e9; - } - - static MappingContext flareMappingContext(Clock clock) throws Exception { - var mapper = new ObjectMapper(); - String ontologyZipFile = "ontology/mapping.zip"; - String mappingFile = "ontology/mapping/mapping_fhir.json"; - String conceptTreeFile = "ontology/mapping/mapping_tree.json"; - - Map mappings = null; - TermCodeNode conceptTree = null; - - try (FileInputStream fis = new FileInputStream(ontologyZipFile); - BufferedInputStream bis = new BufferedInputStream(fis); - ZipInputStream zis = new ZipInputStream(bis)) { - ZipEntry ze; - while ((ze = zis.getNextEntry()) != null) { - if (ze.getName().equals(mappingFile)) { - mappings = Arrays.stream(mapper.readValue(readZipEntryContent(zis), Mapping[].class)) - .collect(Collectors.toMap(Mapping::key, identity())); - } else if (ze.getName().equals(conceptTreeFile)) { - String treeString = readZipEntryContent(zis); - conceptTree = mapper.readValue(treeString, TermCodeNode.class); - } - } - } - return MappingContext.of(mappings, conceptTree, clock); - } - - private static String readZipEntryContent(ZipInputStream zis) throws Exception { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte[] buffer = new byte[1024]; - int len; - while ((len = zis.read(buffer)) > 0) { - baos.write(buffer, 0, len); - } - return baos.toString(StandardCharsets.UTF_8); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/Population.java b/src/main/java/de/medizininformatikinitiative/flare/model/Population.java deleted file mode 100644 index 2ba7f89..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/Population.java +++ /dev/null @@ -1,286 +0,0 @@ -package de.medizininformatikinitiative.flare.model; - -import de.medizininformatikinitiative.flare.service.SerializerException; - -import java.nio.ByteBuffer; -import java.time.Instant; -import java.util.*; - -import static java.nio.charset.StandardCharsets.US_ASCII; -import static java.util.Objects.requireNonNull; - -/** - * A Population is an immutable set of patient ids. - *

- * Patient ids can have a maximum length of 64 chars. - *

- * Uses a sorted array of patient ids internally to store the patient ids memory efficient and facilitate fast - * operations like {@link #intersection(Population) intersection}, {@link #union(Population) union} and - * {@link #difference(Population) difference}. - *

- * Note: {@link #contains(Object) contains} is O(n) - */ -public final class Population extends AbstractSet { - - private static final Population EMPTY = new Population(new String[0], Instant.EPOCH); - - private final String[] patientIds; - private final Instant created; - - private Population(String[] patientIds, Instant created) { - this.patientIds = patientIds; - this.created = created; - } - - public static Population of() { - return EMPTY; - } - - public static Population of(String patientId1) { - checkPatientId(patientId1); - return new Population(new String[]{patientId1.intern()}, Instant.EPOCH); - } - - /** - * Returns an immutable population containing two patient ids. - * - * @param patientId1 the first patient id - * @param patientId2 the second patient id - * @return a {@code Population} containing the specified patient ids - * @throws IllegalArgumentException if one of the patient ids is longer than 64 chars or if the patient ids are - * duplicates - * @throws NullPointerException if a patient id is {@code null} - */ - public static Population of(String patientId1, String patientId2) { - checkPatientId(patientId1); - checkPatientId(patientId2); - var id1 = patientId1.intern(); - var id2 = patientId2.intern(); - if (id1.equals(id2)) { - throw new IllegalArgumentException("duplicate patient id: " + id1); - } - return new Population(id1.compareTo(id2) < 0 ? new String[]{id1, id2} : new String[]{id2, id1}, Instant.EPOCH); - } - - public static Population copyOf(Collection patientIds) { - var idSet = Set.copyOf(patientIds); - String[] internedIds = new String[idSet.size()]; - int i = 0; - for (String id : idSet) { - checkPatientId(id); - internedIds[i++] = id.intern(); - } - Arrays.sort(internedIds); - return new Population(internedIds, Instant.EPOCH); - } - - /** - * Returns the instant at which this population was created. - *

- * Usually the created instant is used for cache expiry, but can be also used to determine how old a population is. - * - * @return the instant at which this population was created - */ - public Instant created() { - return created; - } - - /** - * Returns a new population with {@code created} set to the given value. - * - * @param created the instant to use as created instant for the new population - * @return a new population with {@code created} set to the given value - */ - public Population withCreated(Instant created) { - return new Population(patientIds, requireNonNull(created)); - } - - @Override - public boolean isEmpty() { - return patientIds.length == 0; - } - - @Override - public Iterator iterator() { - return new PatientIdIterator(); - } - - @Override - public int size() { - return patientIds.length; - } - - /** - * Returns the size of this population in memory. - *

- * The calculation uses the fact that an array is used to store the patient ids internally. In addition it assumes - * that all patient ids are {@link String#intern() interned}. Each entry is a reference to a string. References - * have a size of 4 bytes. - *

- * So the memory size is 24 bytes for the population class, 24 bytes for the instant, 20 bytes for the array and 4 - * times the size of the array for the array holding the string references. The strings itself do not count, because - * they are interned. - * - * @return the size of this population in memory - */ - public int memSize() { - return 68 + patientIds.length * 4; - } - - public Population intersection(Population other) { - int i = 0, j = 0, r = 0; - var res = new String[Math.min(patientIds.length, other.patientIds.length)]; - - while (i < patientIds.length && j < other.patientIds.length) { - int cmp = patientIds[i].compareTo(other.patientIds[j]); - if (cmp < 0) { - i++; - } else if (cmp > 0) { - j++; - } else { - res[r++] = patientIds[i++]; - j++; - } - } - - return new Population(Arrays.copyOf(res, r), created.isBefore(other.created) ? created : other.created); - } - - public Population union(Population other) { - int i = 0, j = 0, r = 0; - var res = new String[patientIds.length + other.patientIds.length]; - - while (i < patientIds.length && j < other.patientIds.length) { - int cmp = patientIds[i].compareTo(other.patientIds[j]); - if (cmp < 0) { - res[r++] = patientIds[i++]; - } else if (cmp > 0) { - res[r++] = other.patientIds[j++]; - } else { - res[r++] = patientIds[i++]; - j++; - } - } - - while (i < patientIds.length) { - res[r++] = patientIds[i++]; - } - - while (j < other.patientIds.length) { - res[r++] = other.patientIds[j++]; - } - - return new Population(Arrays.copyOf(res, r), created.isBefore(other.created) ? created : other.created); - } - - public Population difference(Population other) { - int i = 0, j = 0, r = 0; - var res = new String[patientIds.length]; - - while (i < patientIds.length && j < other.patientIds.length) { - int cmp = patientIds[i].compareTo(other.patientIds[j]); - if (cmp < 0) { - res[r++] = patientIds[i++]; - } else if (cmp > 0) { - j++; - } else { - i++; - j++; - } - } - - while (i < patientIds.length) { - res[r++] = patientIds[i++]; - } - - return new Population(Arrays.copyOf(res, r), created.isBefore(other.created) ? created : other.created); - } - - @Override - public boolean equals(Object o) { - if (o == this) - return true; - - if (!(o instanceof Population p)) - return false; - - return created.equals(p.created) && Arrays.equals(patientIds, p.patientIds); - } - - @Override - public int hashCode() { - return Objects.hash(created, Arrays.hashCode(patientIds)); - } - - @Override - public String toString() { - return "Population[size=" + size() + "]"; - } - - public ByteBuffer toByteBuffer() { - ByteBuffer byteBuffer = ByteBuffer.allocateDirect(serializedSize()); - byteBuffer.put((byte) 0); //version byte - - byteBuffer.putLong(created.getEpochSecond()); - byteBuffer.putInt(patientIds.length); - - for (String id : patientIds) { - byte[] bytes = id.getBytes(US_ASCII); - byteBuffer.put((byte) bytes.length); - byteBuffer.put(bytes); - } - - return byteBuffer.flip(); - } - - private int serializedSize() { - return Arrays.stream(patientIds).mapToInt(id -> id.getBytes(US_ASCII).length + 1).sum() + 13; - } - - public static Population fromByteBuffer(ByteBuffer byteBuffer) throws SerializerException { - if (!byteBuffer.hasRemaining()) { - throw new SerializerException("Can't deserialize an empty byte buffer."); - } - - byte versionByte = byteBuffer.get(); - if (versionByte != 0) { - throw new SerializerException("Can't deserialize because version %d isn't supported.".formatted(versionByte)); - } - - var created = Instant.ofEpochSecond(byteBuffer.getLong()); - - var patientIds = new String[byteBuffer.getInt()]; - int i = 0; - while (i < patientIds.length) { - byte[] idBytes = new byte[byteBuffer.get()]; - byteBuffer.get(idBytes); - patientIds[i++] = new String(idBytes, US_ASCII).intern(); - } - return new Population(patientIds, created); - } - - private static void checkPatientId(String patientId1) { - if (patientId1.length() > 64) { - throw new IllegalArgumentException("Patient id `%s` is longer as 64 chars.".formatted(patientId1)); - } - } - - private class PatientIdIterator implements Iterator { - - private int cursor; - - @Override - public boolean hasNext() { - return cursor != patientIds.length; - } - - @Override - public String next() { - try { - return patientIds[cursor++]; - } catch (IndexOutOfBoundsException e) { - throw new NoSuchElementException(); - } - } - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/QueryParams.java b/src/main/java/de/medizininformatikinitiative/flare/model/fhir/QueryParams.java deleted file mode 100644 index e7e2288..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/QueryParams.java +++ /dev/null @@ -1,188 +0,0 @@ -package de.medizininformatikinitiative.flare.model.fhir; - -import de.medizininformatikinitiative.flare.model.sq.Comparator; -import de.medizininformatikinitiative.flare.model.sq.Quantity; -import de.medizininformatikinitiative.flare.model.sq.TermCode; - -import java.time.LocalDate; -import java.util.LinkedList; -import java.util.List; -import java.util.stream.Collectors; - -import static java.util.Objects.requireNonNull; - -/** - * An immutable list of query params. - *

- * In order to build a list of query params, start either with {@link #EMPTY} or the {@link #of(String, Value) creator - * method} and continue with the {@link #appendParam(String, Value) appendParam} method. - */ -public record QueryParams(List params) { - - public static QueryParams EMPTY = new QueryParams(List.of()); - - public QueryParams { - params = List.copyOf(params); - } - - public static QueryParams of(String name, Value value) { - return EMPTY.appendParam(requireNonNull(name), requireNonNull(value)); - } - - public static Value stringValue(String value) { - return new StringValue(requireNonNull(value)); - } - - public static Value conceptValue(TermCode value) { - return new ConceptValue(requireNonNull(value)); - } - - public static Value dateValue(Comparator comparator, LocalDate value) { - return new DateValue(requireNonNull(comparator), requireNonNull(value)); - } - - public static Value quantityValue(Comparator comparator, Quantity value) { - return new QuantityValue(requireNonNull(comparator), requireNonNull(value)); - } - - public static Value compositeConceptValue(TermCode compositeCode, TermCode value) { - return new CompositeConceptValue(requireNonNull(compositeCode), requireNonNull(value)); - } - - public static Value compositeQuantityValue(TermCode compositeCode, Comparator comparator, Quantity value) { - return new CompositeQuantityValue(requireNonNull(compositeCode), requireNonNull(comparator), - requireNonNull(value)); - } - - /** - * Appends a param with {@code name} and {@code value}. - * - * @param name the name of the query parameter - * @param value the value of the query parameter - * @return the {@code QueryParams} resulting in appending the param - */ - public QueryParams appendParam(String name, Value value) { - var sb = new LinkedList<>(this.params); - sb.add(new Param(requireNonNull(name), requireNonNull(value))); - return new QueryParams(sb); - } - - /** - * Appends a params by calling the function {@code appendTo}. - * - * @param params a function that takes a {@code QueryParams}, appends some params returning the resulting {@code QueryParams} - * @return the {@code QueryParams} resulting in appending the params - */ - public QueryParams appendParams(QueryParams params) { - var sb = new LinkedList<>(this.params); - sb.addAll(params.params); - return new QueryParams(sb); - } - - /** - * Prefixes the name of each {@code Param query param} with {@code name} followed by an {@literal .}. - * - * @param name the name to use a prefix - * @return the {@code QueryParams} resulting in prefixing - */ - public QueryParams prefixName(String name) { - return new QueryParams(params.stream().map(param -> new Param(name + "." + param.name, param.value)).toList()); - } - - @Override - public String toString() { - return params.stream().map(Param::toString).collect(Collectors.joining("&")); - } - - private record Param(String name, Value value) { - - @Override - public String toString() { - return name + "=" + value; - } - } - - /** - * A value of a query param. - */ - interface Value { - } - - private record StringValue(String value) implements Value { - - private StringValue { - requireNonNull(value); - } - - @Override - public String toString() { - return value; - } - } - - private record ConceptValue(TermCode value) implements Value { - - private ConceptValue { - requireNonNull(value); - } - - @Override - public String toString() { - return value.searchValue(); - } - } - - private record DateValue(Comparator comparator, LocalDate value) implements Value { - - private DateValue { - requireNonNull(comparator); - requireNonNull(value); - } - - @Override - public String toString() { - return comparator.toString() + value; - } - } - - private record QuantityValue(Comparator comparator, Quantity value) implements Value { - - private QuantityValue { - requireNonNull(comparator); - requireNonNull(value); - } - - @Override - public String toString() { - return comparator.toString() + value.searchValue(); - } - } - - private record CompositeConceptValue(TermCode compositeCode, TermCode value) implements Value { - - private CompositeConceptValue { - requireNonNull(compositeCode); - requireNonNull(value); - } - - @Override - public String toString() { - return compositeCode.searchValue() + "$" + value.searchValue(); - } - } - - private record CompositeQuantityValue(TermCode compositeCode, Comparator comparator, Quantity value) - implements Value { - - private CompositeQuantityValue { - requireNonNull(compositeCode); - requireNonNull(comparator); - requireNonNull(value); - } - - @Override - public String toString() { - return compositeCode.searchValue() + "$" + comparator + value.searchValue(); - } - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/AttributeMapping.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/AttributeMapping.java deleted file mode 100644 index b891c8e..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/AttributeMapping.java +++ /dev/null @@ -1,85 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonNode; -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.sq.ConceptFilterTypeNotExpandableException; -import de.medizininformatikinitiative.flare.model.sq.Criterion; -import de.medizininformatikinitiative.flare.model.sq.TermCode; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedCriterion; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.List; -import java.util.Optional; - -import static de.medizininformatikinitiative.flare.model.mapping.FilterMappingType.*; -import static java.util.Objects.requireNonNull; - -@JsonIgnoreProperties(ignoreUnknown = true) -public record AttributeMapping(FilterMappingType type, TermCode key, String searchParameter, - Optional compositeCode) - implements FilterMapping { - - public AttributeMapping { - requireNonNull(type); - requireNonNull(key); - requireNonNull(searchParameter); - requireNonNull(compositeCode); - } - - @JsonCreator - static AttributeMapping fromJson(@JsonProperty("attributeType") FilterMappingType type, - @JsonProperty("attributeKey") JsonNode key, - @JsonProperty("attributeSearchParameter") String searchParameter, - @JsonProperty("compositeCode") JsonNode compositeCode) - throws CompositeCodeNotFoundException { - requireNonNull(type, "missing JSON property: attributeType"); - requireNonNull(key, "missing JSON property: attributeKey"); - requireNonNull(searchParameter, "missing JSON property: attributeSearchParameter"); - if (type.isCompositeType()) { - if (compositeCode == null) { - throw new CompositeCodeNotFoundException(type); - } - return new AttributeMapping(type, TermCode.fromJsonNode(key), searchParameter, - Optional.of(TermCode.fromJsonNode(compositeCode))); - } - return new AttributeMapping(type, TermCode.fromJsonNode(key), searchParameter, Optional.empty()); - } - - public static AttributeMapping code(TermCode key, String searchParameter) { - return new AttributeMapping(CODE, key, searchParameter, Optional.empty()); - } - - public static AttributeMapping coding(TermCode key, String searchParameter) { - return new AttributeMapping(CONCEPT, key, searchParameter, Optional.empty()); - } - - public static AttributeMapping compositeComparator(TermCode key, String searchParameter, TermCode compositeCode) { - return new AttributeMapping(COMPOSITE_QUANTITY, key, searchParameter, Optional.of(compositeCode)); - } - - public static AttributeMapping compositeRange(TermCode key, String searchParameter, TermCode compositeCode) { - return new AttributeMapping(COMPOSITE_QUANTITY, key, searchParameter, Optional.of(compositeCode)); - } - - public static AttributeMapping compositeConcept(TermCode key, String searchParameter, TermCode compositeCode) { - return new AttributeMapping(COMPOSITE_CONCEPT, key, searchParameter, Optional.of(compositeCode)); - } - - public static AttributeMapping reference(TermCode key, String searchParameter) { - return new AttributeMapping(REFERENCE, key, searchParameter, Optional.empty()); - } - - @Override - public Either> expandReference(MappingContext mappingContext, Criterion criterion) { - return type == REFERENCE - ? criterion.expand(mappingContext) - .map(expandedCriteria -> expandedCriteria.stream() - .map(ExpandedCriterion::filter) - .map(filter -> filter.chain(searchParameter)) - .toList()) - : Either.left(new ConceptFilterTypeNotExpandableException(type)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/AttributeMappingNotFoundException.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/AttributeMappingNotFoundException.java deleted file mode 100644 index 80883c8..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/AttributeMappingNotFoundException.java +++ /dev/null @@ -1,12 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import de.medizininformatikinitiative.flare.model.sq.ContextualTermCode; -import de.medizininformatikinitiative.flare.model.sq.TermCode; - -public class AttributeMappingNotFoundException extends MappingException { - - public AttributeMappingNotFoundException(ContextualTermCode mappingKey, TermCode attributeCode) { - super("Attribute mapping for the term code `%s` in mapping with key `%s` was not found." - .formatted(mappingKey, attributeCode)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/CompositeCodeNotFoundException.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/CompositeCodeNotFoundException.java deleted file mode 100644 index b8b1c6a..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/CompositeCodeNotFoundException.java +++ /dev/null @@ -1,8 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -public class CompositeCodeNotFoundException extends MappingException { - - public CompositeCodeNotFoundException(JsonEnum type) { - super("Expected mapping to have a `compositeCode` property because the type is `%s`.".formatted(type.jsonName())); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/ContextualConceptNotExpandableException.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/ContextualConceptNotExpandableException.java deleted file mode 100644 index 5475b2f..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/ContextualConceptNotExpandableException.java +++ /dev/null @@ -1,10 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import de.medizininformatikinitiative.flare.model.sq.ContextualConcept; - -public class ContextualConceptNotExpandableException extends MappingException { - - public ContextualConceptNotExpandableException(ContextualConcept contextualConcept) { - super("None of the following contextual term codes %s was found in the code tree. Please check the code tree configured by the env var FLARE_MAPPING_CONCEPT_TREE_FILE.".formatted(contextualConcept)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FilterMapping.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FilterMapping.java deleted file mode 100644 index 68aec0b..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FilterMapping.java +++ /dev/null @@ -1,74 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.sq.*; -import de.medizininformatikinitiative.flare.model.sq.expanded.*; - -import java.util.List; -import java.util.Optional; -import java.util.function.Function; - -import static de.medizininformatikinitiative.flare.model.mapping.FilterMappingType.COMPOSITE_CONCEPT; - -public interface FilterMapping { - - String searchParameter(); - - FilterMappingType type(); - - /** - * Returns the optional composite code of this filter mapping. - * - * @return the composite code or {@link Optional#empty() empty} - */ - Optional compositeCode(); - - default Either> expandComparatorFilterPart(MappingContext mappingContext, - Comparator comparator, Quantity value) { - if (type() == FilterMappingType.AGE) { - return (value instanceof Quantity.Unitless) - ? Either.left(new CalculationException("Missing unit in age calculation.")) - : AgeUtils.expandedAgeFilterFromComparator(mappingContext.today(), comparator, (Quantity.WithUnit) value); - } - return Either.right(List.of(compositeCode() - .map(compositeCode -> (ExpandedFilter) new ExpandedCompositeQuantityComparatorFilter( - searchParameter(), compositeCode, comparator, value)) - .orElse(new ExpandedQuantityComparatorFilter(searchParameter(), comparator, value)))); - } - - default Either> expandRangeFilterPart(MappingContext mappingContext, - Quantity lowerBound, Quantity upperBound) { - if (type() == FilterMappingType.AGE) { - return (lowerBound instanceof Quantity.Unitless || upperBound instanceof Quantity.Unitless) - ? Either.left(new CalculationException("Missing unit in age calculation.")) - : AgeUtils.expandedAgeFilterFromRange(mappingContext.today(), (Quantity.WithUnit) lowerBound, - (Quantity.WithUnit) upperBound); - } - return Either.right(List.of(compositeCode() - .map(compositeCode -> (ExpandedFilter) new ExpandedCompositeQuantityRangeFilter( - searchParameter(), compositeCode, lowerBound, upperBound)) - .orElse(new ExpandedQuantityRangeFilter(searchParameter(), lowerBound, upperBound)))); - } - - default Either expandConcept(TermCode concept) { - return switch (type()) { - case CODE -> Either.right(new ExpandedCodeFilter(searchParameter(), concept.code())); - case CONCEPT -> Either.right(new ExpandedConceptFilter(searchParameter(), concept)); - case COMPOSITE_CONCEPT -> compositeCode() - .map((Function>) compositeCode -> - Either.right(new ExpandedCompositeConceptFilter(searchParameter(), compositeCode, concept))) - .orElse(Either.left(new ConceptFilterTypeNotExpandableException(COMPOSITE_CONCEPT))); - default -> Either.left(new ConceptFilterTypeNotExpandableException(type())); - }; - } - - /** - * Expands the {@code criterion} into a list of {@code ExpandedFilter expanded filters} that should be combined with - * logical {@literal OR}. - * - * @param mappingContext the context inside which the expansion should happen - * @param criterion the criterion to expand - * @return either an error or a list of {@code ExpandedFilter expanded filters} - */ - Either> expandReference(MappingContext mappingContext, Criterion criterion); -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FilterMappingType.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FilterMappingType.java deleted file mode 100644 index 5ab135c..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FilterMappingType.java +++ /dev/null @@ -1,34 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public enum FilterMappingType implements JsonEnum { - @JsonProperty("code") CODE(false), - @JsonProperty("concept") CONCEPT(false), - @JsonProperty("composite-quantity") COMPOSITE_QUANTITY(true), - @JsonProperty("composite-concept") COMPOSITE_CONCEPT(true), - @JsonProperty("reference") REFERENCE(false), - @JsonProperty("quantity") QUANTITY(false), - @JsonProperty("Age") AGE(false); - - private final boolean compositeType; - - FilterMappingType(boolean compositeType) { - this.compositeType = compositeType; - } - - public boolean isCompositeType() { - return compositeType; - } - - @Override - public String jsonName() { - try { - var field = FilterMappingType.class.getField(name()); - return field.getAnnotation(JsonProperty.class).value(); - } catch (NoSuchFieldException e) { - // can not happen - throw new Error(e); - } - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FixedCriterion.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FixedCriterion.java deleted file mode 100644 index 1041dc7..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FixedCriterion.java +++ /dev/null @@ -1,46 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonNode; -import de.medizininformatikinitiative.flare.model.sq.TermCode; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedCodeFilter; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedCompositeConceptFilter; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedConceptFilter; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.List; - -import static java.util.Objects.requireNonNull; - -@JsonIgnoreProperties(ignoreUnknown = true) -public record FixedCriterion(FixedCriterionType type, String searchParameter, List concepts, - TermCode compositeCode) { - - public FixedCriterion { - requireNonNull(type); - requireNonNull(searchParameter); - concepts = List.copyOf(concepts); - } - - @JsonCreator - static FixedCriterion fromJson(@JsonProperty("type") FixedCriterionType type, - @JsonProperty("searchParameter") String searchParameter, - @JsonProperty("value") List concepts, - @JsonProperty("compositeCode") JsonNode compositeCode) throws MappingException { - TermCode compCode = compositeCode == null ? null : TermCode.fromJsonNode(compositeCode); - if (type.isCompositeType() && compCode == null) { - throw new CompositeCodeNotFoundException(type); - } - return new FixedCriterion(type, searchParameter, concepts, compCode); - } - - public List expand() { - return concepts.stream().map(concept -> switch (type) { - case CODING -> (ExpandedFilter) new ExpandedConceptFilter(searchParameter, concept); - case CODE -> new ExpandedCodeFilter(searchParameter, concept.code()); - case COMPOSITE_CONCEPT -> new ExpandedCompositeConceptFilter(searchParameter, compositeCode, concept); - }).toList(); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FixedCriterionType.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FixedCriterionType.java deleted file mode 100644 index 92c1686..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/FixedCriterionType.java +++ /dev/null @@ -1,31 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public enum FixedCriterionType implements JsonEnum { - - @JsonProperty("code") CODE(false), - @JsonProperty("coding") CODING(false), - @JsonProperty("composite-concept") COMPOSITE_CONCEPT(true); - - private final boolean compositeType; - - FixedCriterionType(boolean compositeType) { - this.compositeType = compositeType; - } - - public boolean isCompositeType() { - return compositeType; - } - - @Override - public String jsonName() { - try { - var field = FixedCriterionType.class.getField(name()); - return field.getAnnotation(JsonProperty.class).value(); - } catch (NoSuchFieldException e) { - // can not happen - throw new Error(e); - } - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/JsonEnum.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/JsonEnum.java deleted file mode 100644 index 44b5392..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/JsonEnum.java +++ /dev/null @@ -1,6 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -public interface JsonEnum { - - String jsonName(); -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/Mapping.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/Mapping.java deleted file mode 100644 index d9d9341..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/Mapping.java +++ /dev/null @@ -1,146 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.sq.ContextualTermCode; -import de.medizininformatikinitiative.flare.model.sq.Criterion; -import de.medizininformatikinitiative.flare.model.sq.TermCode; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import static java.util.Objects.requireNonNull; - -@JsonIgnoreProperties(ignoreUnknown = true) -public final class Mapping { - - - private final ContextualTermCode key; - private final String resourceType; - private final String termCodeSearchParameter; - private final ValueFilterMapping valueFilterMapping; - private final List fixedCriteria; - private final Map attributeMappings; - private final String timeRestrictionParameter; - - private Mapping(ContextualTermCode key, String resourceType, String termCodeSearchParameter, - ValueFilterMapping valueFilterMapping, List fixedCriteria, - Map attributeMappings, String timeRestrictionParameter) { - this.key = requireNonNull(key); - this.resourceType = requireNonNull(resourceType); - this.termCodeSearchParameter = termCodeSearchParameter; - this.valueFilterMapping = valueFilterMapping; - this.fixedCriteria = List.copyOf(fixedCriteria); - this.attributeMappings = Map.copyOf(attributeMappings); - this.timeRestrictionParameter = timeRestrictionParameter; - } - - public static Mapping of(ContextualTermCode contextualTermCode, String resourceType) { - return new Mapping(contextualTermCode, resourceType, null, null, List.of(), Map.of(), null); - } - - public static Mapping of(ContextualTermCode contextualTermCode, String resourceType, String termCodeSearchParameter) { - return new Mapping(contextualTermCode, resourceType, requireNonNull(termCodeSearchParameter), null, List.of(), - Map.of(), null); - } - - @JsonCreator - public static Mapping of(@JsonProperty("context") TermCode context, - @JsonProperty("key") TermCode key, - @JsonProperty("fhirResourceType") String resourceType, - @JsonProperty("termCodeSearchParameter") String termCodeSearchParameter, - @JsonProperty("valueSearchParameter") String valueSearchParameter, - @JsonProperty("valueType") FilterMappingType valueType, - @JsonProperty("fixedCriteria") List fixedCriteria, - @JsonProperty("attributeSearchParameters") List attributeMappings, - @JsonProperty("timeRestrictionParameter") String timeRestrictionParameter) { - return new Mapping(ContextualTermCode.of(requireNonNull(context, "missing JSON property: context"), - requireNonNull(key, "missing JSON property: key")), resourceType, termCodeSearchParameter, - valueSearchParameter == null - ? null - : new ValueFilterMapping(valueType, valueSearchParameter), - fixedCriteria == null ? List.of() : List.copyOf(fixedCriteria), - attributeMappings == null - ? Map.of() - : attributeMappings.stream().collect(Collectors.toMap(AttributeMapping::key, Function.identity())), - timeRestrictionParameter); - } - - public Mapping withValueFilterMapping(FilterMappingType type, String searchParameter) { - return new Mapping(key, resourceType, termCodeSearchParameter, - new ValueFilterMapping(type, searchParameter), - fixedCriteria, attributeMappings, timeRestrictionParameter); - } - - public Mapping withFixedCriteria(FixedCriterion fixedCriterion) { - var fixedCriteria = new LinkedList<>(this.fixedCriteria); - fixedCriteria.add(fixedCriterion); - return new Mapping(key, resourceType, termCodeSearchParameter, valueFilterMapping, - fixedCriteria, attributeMappings, timeRestrictionParameter); - } - - public Mapping appendAttributeMapping(AttributeMapping attributeMapping) { - var attributeMappings = new HashMap<>(this.attributeMappings); - attributeMappings.put(attributeMapping.key(), attributeMapping); - return new Mapping(key, resourceType, termCodeSearchParameter, valueFilterMapping, - fixedCriteria, attributeMappings, timeRestrictionParameter); - } - - public Mapping withTimeRestrictionParameter(String timeRestrictionParameter) { - return new Mapping(key, resourceType, termCodeSearchParameter, valueFilterMapping, - fixedCriteria, attributeMappings, requireNonNull(timeRestrictionParameter)); - } - - public ContextualTermCode key() { - return key; - } - - public String resourceType() { - return resourceType; - } - - public String termCodeSearchParameter() { - return termCodeSearchParameter; - } - - public Optional valueFilterMapping() { - return Optional.ofNullable(valueFilterMapping); - } - - public List fixedCriteria() { - return fixedCriteria; - } - - public Either findAttributeMapping(TermCode code) { - AttributeMapping mapping = attributeMappings.get(code); - return mapping == null ? Either.left(new AttributeMappingNotFoundException(key, code)) : Either.right(mapping); - } - - public String timeRestrictionParameter() { - return timeRestrictionParameter; - } - - private record ValueFilterMapping(FilterMappingType type, String searchParameter) - implements FilterMapping { - - private ValueFilterMapping { - requireNonNull(type); - requireNonNull(searchParameter); - } - - @Override - public Optional compositeCode() { - return Optional.empty(); - } - - @Override - public Either> expandReference(MappingContext mappingContext, - Criterion criterion) { - return Either.left(new Exception("There are no reference value filters.")); - } - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/MappingContext.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/MappingContext.java deleted file mode 100644 index 7da06eb..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/MappingContext.java +++ /dev/null @@ -1,88 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.sq.ContextualConcept; -import de.medizininformatikinitiative.flare.model.sq.ContextualTermCode; - -import java.time.Clock; -import java.time.LocalDate; -import java.util.List; -import java.util.Map; - -import static java.util.Objects.requireNonNull; - -/** - * A context holding information to facilitate the mapping process. - *

- * Uses the default system clock to private the current instant for date/time calculations. - * - * @author Alexander Kiel - */ -public class MappingContext { - - private final Map mappings; - private final TermCodeNode conceptTree; - private final Clock clock; - - private MappingContext(Map mappings, TermCodeNode conceptTree, Clock clock) { - this.mappings = Map.copyOf(mappings); - this.conceptTree = requireNonNull(conceptTree); - this.clock = requireNonNull(clock); - } - - /** - * Returns a mapping context. - * - * @param mappings the mappings keyed by their term code - * @param conceptTree a tree of concepts to expand (can be null) - * @return the mapping context - */ - public static MappingContext of(Map mappings, TermCodeNode conceptTree) { - return new MappingContext(mappings, conceptTree, Clock.systemDefaultZone()); - } - - /** - * Returns a mapping context. - * - * @param mappings the mappings keyed by their term code - * @param conceptTree a tree of concepts to expand (can be null) - * @param clock a clock that is used for time-related calculations - * @return the mapping context - */ - public static MappingContext of(Map mappings, TermCodeNode conceptTree, Clock clock) { - return new MappingContext(mappings, conceptTree, clock); - } - - /** - * Tries to find the {@link Mapping} with the given {@code key}. - * - * @param key the TermCode of the mapping - * @return either the Mapping or an exception - */ - public Either findMapping(ContextualTermCode key) { - var mapping = mappings.get(requireNonNull(key)); - return mapping == null ? Either.left(new MappingNotFoundException(key)) : Either.right(mapping); - } - - /** - * Expands {@code contextualConcept} into a list of {@link ContextualTermCode contextual term codes}. - * - * @param contextualConcept the contextualConcept to expand - * @return either an error or a list of contextual term codes - */ - public Either> expandConcept(ContextualConcept contextualConcept) { - var contextualTermCodes = contextualConcept.contextualTermCodes().stream().flatMap(conceptTree::expand).toList(); - return contextualTermCodes.isEmpty() - ? Either.left(new ContextualConceptNotExpandableException(contextualConcept)) - : Either.right(contextualTermCodes); - } - - /** - * Returns the current day according to the clock of this mapping context. - * - * @return the current day - */ - public LocalDate today() { - return LocalDate.now(clock); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/MappingException.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/MappingException.java deleted file mode 100644 index d969825..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/MappingException.java +++ /dev/null @@ -1,8 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -public class MappingException extends Exception { - - public MappingException(String message) { - super(message); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/MappingNotFoundException.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/MappingNotFoundException.java deleted file mode 100644 index 8253305..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/MappingNotFoundException.java +++ /dev/null @@ -1,10 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import de.medizininformatikinitiative.flare.model.sq.ContextualTermCode; - -public class MappingNotFoundException extends MappingException { - - public MappingNotFoundException(ContextualTermCode contextualTermCode) { - super("Mapping for the contextual term code %s not found.".formatted(contextualTermCode)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/TermCodeNode.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/TermCodeNode.java deleted file mode 100644 index bd8bfd3..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/TermCodeNode.java +++ /dev/null @@ -1,99 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import de.medizininformatikinitiative.flare.model.sq.ContextualTermCode; -import de.medizininformatikinitiative.flare.model.sq.TermCode; - -import java.util.List; -import java.util.stream.Stream; - -import static java.util.Objects.requireNonNull; - -/** - * @author Alexander Kiel - */ -@JsonIgnoreProperties(ignoreUnknown = true) -public sealed interface TermCodeNode permits TermCodeNode.Abstract, TermCodeNode.Normal { - - static TermCodeNode createAbstract(ContextualTermCode termCode, TermCodeNode... children) { - return new TermCodeNode.Abstract(termCode, children == null ? List.of() : List.of(children)); - } - - static TermCodeNode createNormal(ContextualTermCode termCode, TermCodeNode... children) { - return new TermCodeNode.Normal(termCode, children == null ? List.of() : List.of(children)); - } - - @JsonCreator - static TermCodeNode fromJson(@JsonProperty("context") TermCode context, - @JsonProperty("termCode") TermCode termCode, - @JsonProperty("abstract") boolean abstractJson, - @JsonProperty("children") TermCodeNode... children) { - var contextualTermCode = ContextualTermCode.of(requireNonNull(context, "missing JSON property: context"), - requireNonNull(termCode, "missing JSON property: termCode")); - return abstractJson - ? new Abstract(contextualTermCode, children == null ? List.of() : List.of(children)) - : new Normal(contextualTermCode, children == null ? List.of() : List.of(children)); - } - - Stream expand(ContextualTermCode termCode); - - Stream leafConcepts(); - - ContextualTermCode contextualTermCode(); - - List children(); - - record Abstract(ContextualTermCode contextualTermCode, List children) implements TermCodeNode { - - public Abstract { - requireNonNull(contextualTermCode); - children = List.copyOf(children); - } - - @Override - public Stream expand(ContextualTermCode termCode) { - if (requireNonNull(termCode).equals(this.contextualTermCode)) { - return leafConcepts(); - } else if (children.isEmpty()) { - return Stream.of(); - } else { - return children.stream().flatMap(n -> n.expand(termCode)); - } - } - - @Override - public Stream leafConcepts() { - return children.isEmpty() ? Stream.of() : children.stream().flatMap(TermCodeNode::leafConcepts); - } - } - - record Normal(ContextualTermCode contextualTermCode, List children) implements TermCodeNode { - - public Normal { - requireNonNull(contextualTermCode); - children = List.copyOf(children); - } - - @Override - public Stream expand(ContextualTermCode termCode) { - if (requireNonNull(termCode).equals(this.contextualTermCode)) { - return leafConcepts(); - } else if (children.isEmpty()) { - return Stream.of(); - } else { - return children.stream().flatMap(n -> n.expand(termCode)); - } - } - - @Override - public Stream leafConcepts() { - if (children.isEmpty()) { - return Stream.of(contextualTermCode); - } else { - return Stream.concat(Stream.of(contextualTermCode), children.stream().flatMap(TermCodeNode::leafConcepts)); - } - } - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/ValueMappingNotFoundException.java b/src/main/java/de/medizininformatikinitiative/flare/model/mapping/ValueMappingNotFoundException.java deleted file mode 100644 index 5f0c8f2..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/mapping/ValueMappingNotFoundException.java +++ /dev/null @@ -1,10 +0,0 @@ -package de.medizininformatikinitiative.flare.model.mapping; - -import de.medizininformatikinitiative.flare.model.sq.ContextualTermCode; - -public class ValueMappingNotFoundException extends MappingException { - - public ValueMappingNotFoundException(ContextualTermCode contextualTermCode) { - super("Value mapping for mapping with key `%s` was not found.".formatted(contextualTermCode)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/AttributeFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/AttributeFilter.java deleted file mode 100644 index 33aee80..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/AttributeFilter.java +++ /dev/null @@ -1,54 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.JsonNode; -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.mapping.Mapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.List; - -import static java.util.Objects.requireNonNull; - -@JsonIgnoreProperties(ignoreUnknown = true) -public record AttributeFilter(TermCode code, FilterPart filterPart) implements Filter { - - public AttributeFilter { - requireNonNull(code); - requireNonNull(filterPart); - } - - public static AttributeFilter ofConcept(TermCode code, TermCode firstConcept, TermCode... otherConcepts) { - var filterPart = ConceptFilterPart.of(firstConcept); - for (TermCode concept : otherConcepts) { - filterPart = filterPart.appendConcept(concept); - } - return new AttributeFilter(code, filterPart); - } - - public static AttributeFilter ofReference(TermCode code, Criterion firstCriterion, Criterion... otherCriteria) { - var filterPart = ReferenceFilterPart.of(firstCriterion); - for (Criterion criterion : otherCriteria) { - filterPart = filterPart.appendCriterion(criterion); - } - return new AttributeFilter(code, filterPart); - } - - /** - * Parses an attribute filter part. - * - * @param node the JSON representation of the attribute filter part - * @return the parsed attribute filter part - * @throws IllegalArgumentException if {@code node} isn't valid - */ - public static AttributeFilter fromJsonNode(JsonNode node) { - var code = TermCode.fromJsonNode(node.get("attributeCode")); - return new AttributeFilter(code, FilterPart.fromJsonNode(node)); - } - - @Override - public Either> expand(MappingContext mappingContext, Mapping mapping) { - return mapping.findAttributeMapping(code).flatMap(filterMapping -> filterPart.expand(mappingContext, filterMapping)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/CalculationException.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/CalculationException.java deleted file mode 100644 index 38b658a..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/CalculationException.java +++ /dev/null @@ -1,8 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -public class CalculationException extends Exception { - - public CalculationException(String message) { - super(message); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Comparator.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/Comparator.java deleted file mode 100644 index d11efa0..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Comparator.java +++ /dev/null @@ -1,47 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import static java.util.Objects.requireNonNull; - -/** - * Comparator constants used in Structured Queries. - */ -public enum Comparator { - - EQUAL("eq"), - LESS_EQUAL("le"), - LESS_THAN("lt"), - GREATER_EQUAL("ge"), - GREATER_THAN("gt"); - - private final String s; - - Comparator(String s) { - this.s = requireNonNull(s); - } - - public static Comparator fromJson(String s) { - return switch (s) { - case "eq" -> EQUAL; - case "le" -> LESS_EQUAL; - case "lt" -> LESS_THAN; - case "ge" -> GREATER_EQUAL; - case "gt" -> GREATER_THAN; - default -> throw new IllegalArgumentException("unknown JSON comparator: " + s); - }; - } - - public Comparator reverse() { - return switch (this) { - case GREATER_THAN -> LESS_THAN; - case LESS_THAN -> GREATER_THAN; - case GREATER_EQUAL -> LESS_EQUAL; - case LESS_EQUAL -> GREATER_EQUAL; - default -> EQUAL; - }; - } - - @Override - public String toString() { - return s; - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Concept.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/Concept.java deleted file mode 100644 index 717b9f6..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Concept.java +++ /dev/null @@ -1,31 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import java.util.Formattable; -import java.util.Formatter; -import java.util.List; -import java.util.stream.Collectors; - -/** - * A concept represented by one or more term codes. - */ -public record Concept(List termCodes) implements Formattable { - - public Concept { - termCodes = List.copyOf(termCodes); - } - - public static Concept of(TermCode... termCode) { - return new Concept(List.of(termCode)); - } - - public static Concept of(List termCodes) { - return new Concept(termCodes); - } - - @Override - public void formatTo(Formatter formatter, int flags, int width, int precision) { - formatter.format(termCodes.stream().map(termCode -> "(system: %s, code: %s, display: %s)".formatted( - termCode.system(), termCode.code(), termCode.display() - )).collect(Collectors.joining(", "))); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ConceptFilterPart.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/ConceptFilterPart.java deleted file mode 100644 index ae11a75..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ConceptFilterPart.java +++ /dev/null @@ -1,45 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.Util; -import de.medizininformatikinitiative.flare.model.mapping.FilterMapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.LinkedList; -import java.util.List; - -/** - * Contains a list of selected concepts. - * - * @param concepts selected concepts - */ -public record ConceptFilterPart(List concepts) implements FilterPart { - - public ConceptFilterPart { - concepts = List.copyOf(concepts); - } - - /** - * Creates a concept attribute filter part. - * - * @param concept the first selected concept - * @return the concept attribute filter part - * @throws NullPointerException if {@code concept} is {@code null} - */ - static ConceptFilterPart of(TermCode concept) { - return new ConceptFilterPart(List.of(concept)); - } - - ConceptFilterPart appendConcept(TermCode concept) { - var concepts = new LinkedList<>(this.concepts); - concepts.add(concept); - return new ConceptFilterPart(concepts); - } - - @Override - public Either> expand(MappingContext mappingContext, FilterMapping filterMapping) { - return concepts.stream().map(filterMapping::expandConcept) - .reduce(Either.right(List.of()), Either.lift2(Util::add), Either.liftBinOp(Util::concat)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ConceptFilterTypeNotExpandableException.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/ConceptFilterTypeNotExpandableException.java deleted file mode 100644 index 6abac92..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ConceptFilterTypeNotExpandableException.java +++ /dev/null @@ -1,9 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import de.medizininformatikinitiative.flare.model.mapping.FilterMappingType; - -public class ConceptFilterTypeNotExpandableException extends Exception { - public ConceptFilterTypeNotExpandableException(FilterMappingType type) { - super("Concept Filter of Mapping Filter Type %s could not be expanded.".formatted(type.name())); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ContextualConcept.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/ContextualConcept.java deleted file mode 100644 index 2995499..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ContextualConcept.java +++ /dev/null @@ -1,18 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import java.util.List; - -public record ContextualConcept(TermCode context, Concept concept) { - - public static ContextualConcept of(TermCode context, Concept concept) { - return new ContextualConcept(context, concept); - } - - public static ContextualConcept of(ContextualTermCode contextualTermCode) { - return new ContextualConcept(contextualTermCode.context(), Concept.of(contextualTermCode.termCode())); - } - - public List contextualTermCodes() { - return concept.termCodes().stream().map(termCode -> ContextualTermCode.of(context, termCode)).toList(); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ContextualTermCode.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/ContextualTermCode.java deleted file mode 100644 index bb75b14..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ContextualTermCode.java +++ /dev/null @@ -1,8 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -public record ContextualTermCode(TermCode context, TermCode termCode) { - - public static ContextualTermCode of(TermCode context, TermCode termCode) { - return new ContextualTermCode(context, termCode); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Criterion.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/Criterion.java deleted file mode 100644 index b8c627c..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Criterion.java +++ /dev/null @@ -1,130 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.Util; -import de.medizininformatikinitiative.flare.model.mapping.FixedCriterion; -import de.medizininformatikinitiative.flare.model.mapping.Mapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedCriterion; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; -import reactor.core.publisher.Mono; - -import java.util.LinkedList; -import java.util.List; - -import static java.util.Objects.requireNonNull; - -/** - * A single, atomic criterion in a {@link StructuredQuery structured query}. - * - * @param concept the concept the criterion is about - * @param filters the filters applied to entities of {@code concept} - */ -@JsonIgnoreProperties(ignoreUnknown = true) -public record Criterion(ContextualConcept concept, List filters) { - - public Criterion { - requireNonNull(concept); - filters = List.copyOf(filters); - } - - public static Criterion of(ContextualConcept concept) { - return new Criterion(concept, List.of()); - } - - public static Criterion of(ContextualConcept concept, ValueFilter valueFilter) { - return new Criterion(concept, List.of(valueFilter)); - } - - @JsonCreator - static Criterion fromJson(@JsonProperty("context") TermCode context, - @JsonProperty("termCodes") List termCodes, - @JsonProperty("valueFilter") ObjectNode valueFilter, - @JsonProperty("attributeFilters") List attributeFilters, - @JsonProperty("timeRestriction") TimeRestriction timeRestriction) { - var concept = ContextualConcept.of(requireNonNull(context, "missing JSON property: context"), - Concept.of(requireNonNull(termCodes, "missing JSON property: termCodes"))); - - var filters = new LinkedList(); - if (valueFilter != null) { - filters.add(ValueFilter.fromJsonNode(valueFilter)); - } - for (ObjectNode attributeFilter : (attributeFilters == null ? List.of() : attributeFilters)) { - filters.add(AttributeFilter.fromJsonNode(attributeFilter)); - } - if (timeRestriction != null) { - filters.add(timeRestriction); - } - - return new Criterion(concept, filters); - } - - static Criterion fromJsonNode(JsonNode node) { - try { - return new ObjectMapper().treeToValue(node, Criterion.class); - } catch (JsonProcessingException e) { - throw new IllegalArgumentException(e); - } - } - - Criterion appendAttributeFilter(AttributeFilter attributeFilter) { - var filters = new LinkedList<>(this.filters); - filters.add(attributeFilter); - return new Criterion(concept, filters); - } - - Criterion appendTimeRestrictionFilter(TimeRestriction timeRestrictionFilter) { - var filters = new LinkedList<>(this.filters); - filters.add(timeRestrictionFilter); - return new Criterion(concept, filters); - } - - /** - * Expands this criterion into a {@link Mono mono} of {@link ExpandedCriterion expanded criteria}. - * - * @param mappingContext the context inside which the expansion should happen - * @return a mono of expanded criteria - */ - public Either> expand(MappingContext mappingContext) { - return mappingContext.expandConcept(concept) - .flatMap(contextualTermCodes -> contextualTermCodes.stream() - .map(contextualTermCode -> expandContextualTermCode(mappingContext, contextualTermCode)) - .reduce(Either.right(List.of()), Either.liftBinOp(Util::concat))); - } - - private Either> expandContextualTermCode(MappingContext mappingContext, - ContextualTermCode contextualTermCode) { - return mappingContext.findMapping(contextualTermCode) - .flatMap(mapping -> expandFilters(mappingContext, mapping) - .map(Util::cartesianProduct) - .map(expandedFilterMatrix -> expandedFilterMatrix.isEmpty() - ? List.of(expandedCriterion(mapping, contextualTermCode.termCode())) - : expandedFilterMatrix.stream() - .map(expandedFilters -> expandedCriterion(mapping, contextualTermCode.termCode()) - .appendFilters(expandedFilters)) - .toList())); - } - - private Either>> expandFilters(MappingContext mappingContext, Mapping mapping) { - return filters.stream() - .map(filter -> filter.expand(mappingContext, mapping)) - .reduce(Either.right(fixedCriterionFilters(mapping)), Either.lift2(Util::add), Either.liftBinOp(Util::concat)); - } - - private static List> fixedCriterionFilters(Mapping mapping) { - return mapping.fixedCriteria().stream().map(FixedCriterion::expand).toList(); - } - - private static ExpandedCriterion expandedCriterion(Mapping mapping, TermCode termCode) { - return mapping.termCodeSearchParameter() == null - ? ExpandedCriterion.of(mapping.resourceType()) - : ExpandedCriterion.of(mapping.resourceType(), mapping.termCodeSearchParameter(), termCode); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/CriterionGroup.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/CriterionGroup.java deleted file mode 100644 index 7f82ec5..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/CriterionGroup.java +++ /dev/null @@ -1,129 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.Util; -import de.medizininformatikinitiative.flare.model.Population; -import de.medizininformatikinitiative.flare.model.translate.Expression; -import de.medizininformatikinitiative.flare.model.translate.Operator; -import org.reactivestreams.Publisher; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; -import reactor.core.publisher.ParallelFlux; -import reactor.core.scheduler.Scheduler; -import reactor.core.scheduler.Schedulers; - -import java.util.List; -import java.util.function.Function; -import java.util.stream.Stream; - -import static java.util.Objects.requireNonNull; - -/** - * A non-empty group of {@link Criterion criteria} providing operations to execute and translate them. - * - * @param firstCriterion the first criterion - * @param moreCriteria a list of more criteria - * @param the type of the criteria that can be either {@link Criterion} itself or an additional layer of - * groups - */ -public record CriterionGroup(T firstCriterion, List moreCriteria) { - - private static final Scheduler SCHEDULER = Schedulers.parallel(); - - public CriterionGroup { - requireNonNull(firstCriterion); - moreCriteria = List.copyOf(moreCriteria); - } - - public static CriterionGroup of(T c1) { - return new CriterionGroup<>(c1, List.of()); - } - - public static CriterionGroup of(T c1, T c2) { - return new CriterionGroup<>(c1, List.of(c2)); - } - - /** - * Returns a group consisting of the results of applying the {@code mapper} to its {@code criteria}. - * - * @param mapper the function to apply on all {@code criteria} of this group - * @param the function result type - * @return a group consisting of the results of applying the {@code mapper} to its {@code criteria} - */ - public CriterionGroup map(Function mapper) { - return new CriterionGroup<>(mapper.apply(firstCriterion), moreCriteria.stream().map(mapper).toList()); - } - - /** - * Wraps all {@code criteria} of this group into an additional layer of groups. - * - * @return a criterion group of criterion groups of the original criteria - */ - public CriterionGroup> wrapCriteria() { - return map(CriterionGroup::of); - } - - /** - * Executes all {@code criteria} of this group using the {@code executor} and performs a set - * {@link Population#intersection(Population) intersection} on the results. - */ - public Mono executeAndIntersection(Function> executor) { - return parallelCriteriaFlux().flatMap(executor).reduce(Population::intersection); - } - - /** - * Executes all {@code criteria} of this group using the {@code executor} and performs a set - * {@link Population#union(Population) union} on the results. - */ - public Mono executeAndUnion(Function> executor) { - return parallelCriteriaFlux().flatMap(executor).reduce(Population::union); - } - - /** - * Translates all {@code criteria} of this group using the {@code translator} and wraps all resulting expressions - * into an {@link Operator#intersection(Expression) intersection} operator. - */ - public Either translateAndIntersection(Function> translator) { - return translator.apply(firstCriterion) - .flatMap(firstOperand -> translateMoreCriteria(translator) - .map(moreOperands -> Operator.intersection(firstOperand, moreOperands))); - } - - private Either> translateMoreCriteria(Function> translator) { - return moreCriteria.stream().map(translator).reduce(Either.right(List.of()), Either.lift2(Util::add), - Either.liftBinOp(Util::concat)); - } - - /** - * Translates all {@code criteria} of this group using the {@code translator} and wraps all resulting expressions - * into an {@link Operator#union(Expression) union} operator. - */ - public Either translateAndUnion(Function> translator) { - return translator.apply(firstCriterion) - .flatMap(firstOperand -> translateMoreCriteria(translator) - .map(moreOperands -> Operator.union(firstOperand, moreOperands))); - } - - /** - * Translates all {@code criteria} of this group using the {@code translator} and adds all resulting operands to - * the first operator. - */ - public Either translateAndConcat(Function>> translator) { - return translator.apply(firstCriterion) - .flatMap(firstOperand -> translateMoreCriteriaFlatten(translator) - .map(firstOperand::addAll)); - } - - private Either> translateMoreCriteriaFlatten(Function>> translator) { - return moreCriteria.stream().map(translator).reduce(Either.right(List.of()), Either.lift2((list, operator) -> Util.concat(list, operator.operands())), - Either.liftBinOp(Util::concat)); - } - - private ParallelFlux parallelCriteriaFlux() { - return Flux.fromStream(stream()).parallel().runOn(SCHEDULER); - } - - private Stream stream() { - return Stream.concat(Stream.of(firstCriterion), moreCriteria.stream()); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Filter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/Filter.java deleted file mode 100644 index 4ee5e57..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Filter.java +++ /dev/null @@ -1,21 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.mapping.Mapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.List; - -public interface Filter { - - /** - * Expands this filter into a list {@link ExpandedFilter expanded filters} that should be combined with logical - * {@literal OR}. - * - * @param mappingContext the context inside which the expansion should happen - * @param mapping the mapping to use for expansion - * @return either an error or a list of expanded filters - */ - Either> expand(MappingContext mappingContext, Mapping mapping); -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/FilterPart.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/FilterPart.java deleted file mode 100644 index 48cc778..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/FilterPart.java +++ /dev/null @@ -1,81 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.JsonNode; -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.mapping.FilterMapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.List; -import java.util.stream.StreamSupport; - -/** - * The common part of {@link AttributeFilter} and {@link ValueFilter}. - */ -@JsonIgnoreProperties(ignoreUnknown = true) -public interface FilterPart { - - /** - * Parses a value filter part. - * - * @param node the JSON representation of the value filter part - * @return the parsed value filter part - * @throws IllegalArgumentException if {@code node} isn't valid - */ - static FilterPart fromJsonNode(JsonNode node) { - var type = node.get("type").asText(); - - return switch (type) { - case "concept" -> { - var selectedConcepts = node.get("selectedConcepts"); - if (selectedConcepts == null || selectedConcepts.isEmpty()) { - throw new IllegalArgumentException("empty selectedConcepts"); - } else { - yield new ConceptFilterPart(StreamSupport.stream(selectedConcepts.spliterator(), false) - .map(TermCode::fromJsonNode).toList()); - } - } - case "quantity-comparator" -> { - var comparator = Comparator.fromJson(node.get("comparator").asText()); - var value = node.get("value").decimalValue(); - var unit = node.get("unit"); - yield QuantityComparatorFilterPart.of(comparator, unit == null ? Quantity.of(value) - : Quantity.of(value, ucumTermCode(unit))); - } - case "quantity-range" -> { - var lowerBound = node.get("minValue").decimalValue(); - var upperBound = node.get("maxValue").decimalValue(); - var unit = node.get("unit"); - yield QuantityRangeFilterPart.of(unit == null ? Quantity.of(lowerBound) - : Quantity.of(lowerBound, ucumTermCode(unit)), unit == null ? Quantity.of(upperBound) - : Quantity.of(upperBound, ucumTermCode(unit))); - } - case "reference" -> { - var criteria = node.get("criteria"); - if (criteria == null || criteria.isEmpty()) { - throw new IllegalArgumentException("empty criteria"); - } else { - yield new ReferenceFilterPart(StreamSupport.stream(criteria.spliterator(), false) - .map(Criterion::fromJsonNode).toList()); - } - } - default -> throw new IllegalArgumentException("unknown filterPart type: " + type); - }; - } - - private static TermCode ucumTermCode(JsonNode unit) { - var system = unit.get("system") == null ? "http://unitsofmeasure.org" : unit.get("system").asText(); - return new TermCode(system, unit.get("code").asText(), unit.get("display").asText()); - } - - /** - * Expands this {@code FilterPart} into a list of {@code ExpandedFilter expanded filters} that should be combined - * with logical {@literal OR}. - * - * @param mappingContext the context inside which the expansion should happen - * @param filterMapping the mapping for the filter to expand - * @return either an error or a list of expanded filters - */ - Either> expand(MappingContext mappingContext, FilterMapping filterMapping); -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Quantity.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/Quantity.java deleted file mode 100644 index 83df89c..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/Quantity.java +++ /dev/null @@ -1,61 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import java.math.BigDecimal; - -/** - * A quantity with or without unit. - */ -public sealed interface Quantity permits Quantity.Unitless, Quantity.WithUnit { - - /** - * Creates a unitless quantity. - * - * @param value the value of the quantity - * @return a unitless quantity - */ - static Quantity.Unitless of(BigDecimal value) { - return new Unitless(value); - } - - /** - * Creates a quantity with unit. - * - * @param value the value of the quantity - * @param unit the unit of the quantity - * @return a quantity with unit - */ - static Quantity.WithUnit of(BigDecimal value, TermCode unit) { - return new WithUnit(value, unit); - } - - /** - * Returns a string that can be used as FHIR search parameter value. - * - * @return a string that can be used as FHIR search parameter value - */ - String searchValue(); - - record Unitless(BigDecimal value) implements Quantity { - - @Override - public String searchValue() { - return value.toString(); - } - } - - record WithUnit(BigDecimal value, TermCode unit) implements Quantity { - - public Quantity.WithUnit add(Quantity.WithUnit augend) { - if (!unit.equals(augend.unit)) { - throw new IllegalArgumentException("Incompatible units `%s` and `%s` in addition.".formatted(unit, - augend.unit)); - } - return new WithUnit(value.add(augend.value), unit); - } - - @Override - public String searchValue() { - return value + "|" + unit.searchValue(); - } - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/QuantityComparatorFilterPart.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/QuantityComparatorFilterPart.java deleted file mode 100644 index bd40f91..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/QuantityComparatorFilterPart.java +++ /dev/null @@ -1,34 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.mapping.FilterMapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.List; - -import static java.util.Objects.requireNonNull; - -public record QuantityComparatorFilterPart(Comparator comparator, Quantity value) implements FilterPart { - - public QuantityComparatorFilterPart { - requireNonNull(comparator); - requireNonNull(value); - } - - /** - * Returns a comparator filter part. - * - * @param comparator the comparator that should be used in the value comparison - * @param value the value that should be used in the value comparison - * @return the comparator filter part - */ - public static QuantityComparatorFilterPart of(Comparator comparator, Quantity value) { - return new QuantityComparatorFilterPart(comparator, value); - } - - @Override - public Either> expand(MappingContext mappingContext, FilterMapping filterMapping) { - return filterMapping.expandComparatorFilterPart(mappingContext, comparator, value); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/QuantityRangeFilterPart.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/QuantityRangeFilterPart.java deleted file mode 100644 index 7160fc3..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/QuantityRangeFilterPart.java +++ /dev/null @@ -1,27 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.mapping.FilterMapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.List; - -import static java.util.Objects.requireNonNull; - -public record QuantityRangeFilterPart(Quantity lowerBound, Quantity upperBound) implements FilterPart { - - public QuantityRangeFilterPart { - requireNonNull(lowerBound); - requireNonNull(upperBound); - } - - public static QuantityRangeFilterPart of(Quantity lowerBound, Quantity upperBound) { - return new QuantityRangeFilterPart(lowerBound, upperBound); - } - - @Override - public Either> expand(MappingContext mappingContext, FilterMapping filterMapping) { - return filterMapping.expandRangeFilterPart(mappingContext, lowerBound, upperBound); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ReferenceFilterPart.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/ReferenceFilterPart.java deleted file mode 100644 index a9f46a1..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ReferenceFilterPart.java +++ /dev/null @@ -1,40 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.Util; -import de.medizininformatikinitiative.flare.model.mapping.FilterMapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.LinkedList; -import java.util.List; - -public record ReferenceFilterPart(List criteria) implements FilterPart { - - public ReferenceFilterPart { - criteria = List.copyOf(criteria); - } - - /** - * Creates a reference attribute filter part. - * - * @param criterion the first selected criterion - * @return the criterion attribute filter part - * @throws NullPointerException if {@code criterion} is {@code null} - */ - static ReferenceFilterPart of(Criterion criterion) { - return new ReferenceFilterPart(List.of(criterion)); - } - - ReferenceFilterPart appendCriterion(Criterion criterion) { - var criteria = new LinkedList<>(this.criteria); - criteria.add(criterion); - return new ReferenceFilterPart(criteria); - } - - @Override - public Either> expand(MappingContext mappingContext, FilterMapping filterMapping) { - return criteria.stream().map(criterion -> filterMapping.expandReference(mappingContext, criterion)) - .reduce(Either.right(List.of()), Either.liftBinOp(Util::concat)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/StructuredQuery.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/StructuredQuery.java deleted file mode 100644 index a72680a..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/StructuredQuery.java +++ /dev/null @@ -1,64 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; -import java.util.Optional; -import java.util.stream.Stream; - -import static java.util.Objects.requireNonNull; - -@JsonIgnoreProperties(ignoreUnknown = true) -public record StructuredQuery(CriterionGroup> inclusionCriteria, - Optional>> exclusionCriteria) { - - public StructuredQuery { - requireNonNull(inclusionCriteria); - requireNonNull(exclusionCriteria); - } - - public static StructuredQuery of(CriterionGroup> inclusionCriteria) { - return new StructuredQuery(inclusionCriteria, Optional.empty()); - } - - public static StructuredQuery of(CriterionGroup> inclusionCriteria, - CriterionGroup> exclusionCriteria) { - return new StructuredQuery(inclusionCriteria, Optional.of(exclusionCriteria)); - } - - @JsonCreator - public static StructuredQuery fromJson(@JsonProperty("inclusionCriteria") List> inclusionCriteria, - @JsonProperty("exclusionCriteria") List> exclusionCriteria) { - if (inclusionCriteria == null) { - throw new IllegalArgumentException("empty inclusion criteria"); - } - - var inclusionCriteriaGroups = inclusionCriteria.stream().flatMap(StructuredQuery::createCriterionGroup).toList(); - - if (inclusionCriteriaGroups.isEmpty()) { - throw new IllegalArgumentException("empty inclusion criteria"); - } - - var inclusionCriteriaGroup = new CriterionGroup<>(inclusionCriteriaGroups.get(0), inclusionCriteriaGroups.stream().skip(1).toList()); - - if (exclusionCriteria == null) { - return new StructuredQuery(inclusionCriteriaGroup, Optional.empty()); - } - - var exclusionCriteriaGroups = exclusionCriteria.stream().flatMap(StructuredQuery::createCriterionGroup).toList(); - - if (exclusionCriteriaGroups.isEmpty()) { - return new StructuredQuery(inclusionCriteriaGroup, Optional.empty()); - } - return new StructuredQuery(inclusionCriteriaGroup, Optional.of(new CriterionGroup<>(exclusionCriteriaGroups.get(0), - exclusionCriteriaGroups.stream().skip(1).toList()))); - } - - private static Stream> createCriterionGroup(List criteria) { - return criteria == null || criteria.isEmpty() - ? Stream.empty() - : Stream.of(new CriterionGroup<>(criteria.get(0), criteria.stream().skip(1).toList())); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/TermCode.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/TermCode.java deleted file mode 100644 index 3903621..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/TermCode.java +++ /dev/null @@ -1,66 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonNode; - -import java.util.Objects; - -import static java.util.Objects.requireNonNull; - -/** - * A terminology code, coding a concept. - *

- * Instances are immutable and implement {@code equals} and {@code hashCode} based on {@link #system() system} and - * {@link #code() code}. - */ -@JsonIgnoreProperties(ignoreUnknown = true) -public record TermCode(String system, String code, String display) { - - public TermCode { - requireNonNull(system); - requireNonNull(code); - requireNonNull(display); - } - - /** - * Returns a terminology code. - * - * @param system the terminology to use (mostly represented by an URL) - * @param code the code within the terminology - * @param display a human-readable string of the concept coded - * @return the terminology code - */ - @JsonCreator - public static TermCode of(@JsonProperty("system") String system, @JsonProperty("code") String code, - @JsonProperty("display") String display) { - return new TermCode(system, code, display); - } - - public static TermCode fromJsonNode(JsonNode node) { - return TermCode.of(node.get("system").asText(), node.get("code").asText(), node.get("display").asText()); - } - - /** - * Returns a string that can be used as FHIR search parameter value. - * - * @return a string that can be used as FHIR search parameter value - */ - public String searchValue() { - return system + "|" + code; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - TermCode termCode = (TermCode) o; - return system.equals(termCode.system) && code.equals(termCode.code); - } - - @Override - public int hashCode() { - return Objects.hash(system, code); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/TimeRestriction.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/TimeRestriction.java deleted file mode 100644 index ea39995..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/TimeRestriction.java +++ /dev/null @@ -1,80 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.mapping.Mapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedDateComparatorFilter; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedDateRangeFilter; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.time.LocalDate; -import java.time.format.DateTimeParseException; -import java.util.List; - -import static de.medizininformatikinitiative.flare.model.sq.Comparator.GREATER_EQUAL; -import static de.medizininformatikinitiative.flare.model.sq.Comparator.LESS_EQUAL; -import static java.util.Objects.requireNonNull; - -public interface TimeRestriction extends Filter { - - @JsonCreator - static TimeRestriction fromJson(@JsonProperty("afterDate") String afterDate, - @JsonProperty("beforeDate") String beforeDate) { - if (afterDate == null && beforeDate == null) { - throw new IllegalArgumentException("Missing properties expect at least one of `afterDate` or `beforeDate`."); - } else if (afterDate == null) { - return new OpenStart(parseLocalDate("beforeDate", beforeDate)); - } else if (beforeDate == null) { - return new OpenEnd(parseLocalDate("afterDate", afterDate)); - } else { - return new Interval(parseLocalDate("afterDate", afterDate), parseLocalDate("beforeDate", beforeDate)); - } - } - - private static LocalDate parseLocalDate(String name, String s) { - try { - return LocalDate.parse(s); - } catch (DateTimeParseException e) { - throw new IllegalArgumentException("Invalid value `%s` in time restriction property `%s`.".formatted(s, name)); - } - } - - record OpenStart(LocalDate end) implements TimeRestriction { - - public OpenStart { - requireNonNull(end); - } - - @Override - public Either> expand(MappingContext mappingContext, Mapping mapping) { - return Either.right(List.of(new ExpandedDateComparatorFilter(mapping.timeRestrictionParameter(), LESS_EQUAL, end))); - } - } - - record OpenEnd(LocalDate start) implements TimeRestriction { - - public OpenEnd { - requireNonNull(start); - } - - @Override - public Either> expand(MappingContext mappingContext, Mapping mapping) { - return Either.right(List.of(new ExpandedDateComparatorFilter(mapping.timeRestrictionParameter(), GREATER_EQUAL, start))); - } - } - - record Interval(LocalDate start, LocalDate end) implements TimeRestriction { - - public Interval { - requireNonNull(start); - requireNonNull(end); - } - - @Override - public Either> expand(MappingContext mappingContext, Mapping mapping) { - return Either.right(List.of(new ExpandedDateRangeFilter(mapping.timeRestrictionParameter(), start, end))); - } - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ValueFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/ValueFilter.java deleted file mode 100644 index b09b88a..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/ValueFilter.java +++ /dev/null @@ -1,55 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.JsonNode; -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.mapping.Mapping; -import de.medizininformatikinitiative.flare.model.mapping.MappingContext; -import de.medizininformatikinitiative.flare.model.mapping.ValueMappingNotFoundException; -import de.medizininformatikinitiative.flare.model.sq.expanded.ExpandedFilter; - -import java.util.List; - -import static java.util.Objects.requireNonNull; - -@JsonIgnoreProperties(ignoreUnknown = true) -public record ValueFilter(FilterPart filterPart) implements Filter { - - public ValueFilter { - requireNonNull(filterPart); - } - - public static ValueFilter ofConcept(TermCode firstConcept, TermCode... otherConcepts) { - var filterPart = ConceptFilterPart.of(firstConcept); - for (TermCode concept : otherConcepts) { - filterPart = filterPart.appendConcept(concept); - } - return new ValueFilter(filterPart); - } - - public static ValueFilter ofComparator(Comparator comparator, Quantity value) { - return new ValueFilter(QuantityComparatorFilterPart.of(comparator, value)); - } - - public static ValueFilter ofRange(Quantity lowerBound, Quantity upperBound) { - return new ValueFilter(QuantityRangeFilterPart.of(lowerBound, upperBound)); - } - - /** - * Parses an attribute filter part. - * - * @param node the JSON representation of the attribute filter part - * @return the parsed attribute filter part - * @throws IllegalArgumentException if {@code node} isn't valid - */ - public static ValueFilter fromJsonNode(JsonNode node) { - return new ValueFilter(FilterPart.fromJsonNode(node)); - } - - @Override - public Either> expand(MappingContext mappingContext, Mapping mapping) { - return mapping.valueFilterMapping() - .map(filterMapping -> filterPart.expand(mappingContext, filterMapping)) - .orElseGet(() -> Either.left(new ValueMappingNotFoundException(mapping.key()))); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/AgeUtils.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/AgeUtils.java deleted file mode 100644 index dff0cab..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/AgeUtils.java +++ /dev/null @@ -1,61 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.Either; -import de.medizininformatikinitiative.flare.model.sq.CalculationException; -import de.medizininformatikinitiative.flare.model.sq.Comparator; -import de.medizininformatikinitiative.flare.model.sq.Quantity; -import reactor.core.publisher.Mono; - -import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.List; - -public class AgeUtils { - - /** - * Calculates the birth date of a patient from the given age. - * - * @param today the day to base the calculation on - * @param age the value of the age - * @return a {@link Mono} containing either the birth date or an {@link CalculationException} if the unit of age - * is unknown - */ - private static Either birthDate(LocalDate today, Quantity.WithUnit age) { - return switch (age.unit().code()) { - case "a" -> Either.right(today.minusYears(age.value().intValue())); - case "mo" -> Either.right(today.minusMonths(age.value().intValue())); - case "wk" -> Either.right(today.minusWeeks(age.value().intValue())); - default -> Either.left(new CalculationException("Unknown age unit `%s`.".formatted(age.unit().code()))); - }; - } - - private static Either equalCaseLowerDate(LocalDate today, Quantity.WithUnit age) { - return birthDate(today, age.add(Quantity.of(BigDecimal.ONE, age.unit()))).map(date -> date.plusDays(1)); - } - - private static Either equalCaseUpperDate(LocalDate today, Quantity.WithUnit age) { - return birthDate(today, age); - } - - public static Either> expandedAgeFilterFromComparator(LocalDate today, - Comparator comparator, - Quantity.WithUnit age) { - if (comparator.equals(Comparator.EQUAL)) { - return equalCaseLowerDate(today, age) - .flatMap(lowerBound -> equalCaseUpperDate(today, age) - .map(upperBound -> List.of(new ExpandedDateRangeFilter("birthdate", lowerBound, upperBound)))); - } else { - return birthDate(today, age).map(birthDate -> - List.of(new ExpandedDateComparatorFilter("birthdate", comparator.reverse(), birthDate))); - } - } - - public static Either> expandedAgeFilterFromRange(LocalDate today, - Quantity.WithUnit ageLowerBound, - Quantity.WithUnit ageUpperBound) { - return birthDate(today, ageLowerBound) - .flatMap(upperBoundDate -> birthDate(today, ageUpperBound) - .map(lowerBoundDate -> List.of(new ExpandedDateRangeFilter("birthdate", lowerBoundDate, - upperBoundDate)))); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ChainedFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ChainedFilter.java deleted file mode 100644 index cff0a7d..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ChainedFilter.java +++ /dev/null @@ -1,18 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; - -import static java.util.Objects.requireNonNull; - -public record ChainedFilter(String searchParameter, ExpandedFilter filter) implements ExpandedFilter { - - public ChainedFilter { - requireNonNull(searchParameter); - requireNonNull(filter); - } - - @Override - public QueryParams toParams() { - return filter.toParams().prefixName(searchParameter); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCodeFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCodeFilter.java deleted file mode 100644 index 8c0f73a..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCodeFilter.java +++ /dev/null @@ -1,25 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; - -import static de.medizininformatikinitiative.flare.model.fhir.QueryParams.stringValue; -import static java.util.Objects.requireNonNull; - -/** - * A value filter using a single string code as value. - * - * @param searchParameter the FHIR search parameter code to use for the value - * @param value the code to search for - */ -public record ExpandedCodeFilter(String searchParameter, String value) implements ExpandedFilter { - - public ExpandedCodeFilter { - requireNonNull(searchParameter); - requireNonNull(value); - } - - @Override - public QueryParams toParams() { - return QueryParams.of(searchParameter, stringValue(value)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCompositeConceptFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCompositeConceptFilter.java deleted file mode 100644 index 63f82ac..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCompositeConceptFilter.java +++ /dev/null @@ -1,29 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; -import de.medizininformatikinitiative.flare.model.sq.TermCode; - -import static de.medizininformatikinitiative.flare.model.fhir.QueryParams.compositeConceptValue; -import static java.util.Objects.requireNonNull; - -/** - * A value filter with composite code, using a concept as value. - * - * @param searchParameter the FHIR search parameter code to use for the value - * @param compositeCode the code to prepend before the {@code value} - * @param value the code to search for - */ -public record ExpandedCompositeConceptFilter(String searchParameter, TermCode compositeCode, TermCode value) - implements ExpandedFilter { - - public ExpandedCompositeConceptFilter { - requireNonNull(searchParameter); - requireNonNull(compositeCode); - requireNonNull(value); - } - - @Override - public QueryParams toParams() { - return QueryParams.of(searchParameter, compositeConceptValue(compositeCode, value)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCompositeQuantityComparatorFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCompositeQuantityComparatorFilter.java deleted file mode 100644 index 3d195e0..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCompositeQuantityComparatorFilter.java +++ /dev/null @@ -1,27 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; -import de.medizininformatikinitiative.flare.model.sq.Comparator; -import de.medizininformatikinitiative.flare.model.sq.Quantity; -import de.medizininformatikinitiative.flare.model.sq.TermCode; - -import static de.medizininformatikinitiative.flare.model.fhir.QueryParams.compositeQuantityValue; -import static java.util.Objects.requireNonNull; - -public record ExpandedCompositeQuantityComparatorFilter(String searchParameter, TermCode compositeCode, - Comparator comparator, Quantity value) - implements ExpandedFilter { - - public ExpandedCompositeQuantityComparatorFilter { - requireNonNull(searchParameter); - requireNonNull(compositeCode); - requireNonNull(comparator); - requireNonNull(value); - } - - @Override - public QueryParams toParams() { - return QueryParams.EMPTY.appendParam(searchParameter, compositeQuantityValue(compositeCode, - comparator, value)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCompositeQuantityRangeFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCompositeQuantityRangeFilter.java deleted file mode 100644 index 43aebd2..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCompositeQuantityRangeFilter.java +++ /dev/null @@ -1,28 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; -import de.medizininformatikinitiative.flare.model.sq.Quantity; -import de.medizininformatikinitiative.flare.model.sq.TermCode; - -import static de.medizininformatikinitiative.flare.model.fhir.QueryParams.compositeQuantityValue; -import static de.medizininformatikinitiative.flare.model.sq.Comparator.GREATER_EQUAL; -import static de.medizininformatikinitiative.flare.model.sq.Comparator.LESS_EQUAL; -import static java.util.Objects.requireNonNull; - -public record ExpandedCompositeQuantityRangeFilter(String searchParameter, TermCode compositeCode, - Quantity lowerBound, Quantity upperBound) - implements ExpandedFilter { - - public ExpandedCompositeQuantityRangeFilter { - requireNonNull(searchParameter); - requireNonNull(compositeCode); - requireNonNull(lowerBound); - requireNonNull(upperBound); - } - - @Override - public QueryParams toParams() { - return QueryParams.of(searchParameter, compositeQuantityValue(compositeCode, GREATER_EQUAL, lowerBound)) - .appendParam(searchParameter, compositeQuantityValue(compositeCode, LESS_EQUAL, upperBound)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedConceptFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedConceptFilter.java deleted file mode 100644 index 761cd18..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedConceptFilter.java +++ /dev/null @@ -1,26 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; -import de.medizininformatikinitiative.flare.model.sq.TermCode; - -import static de.medizininformatikinitiative.flare.model.fhir.QueryParams.conceptValue; -import static java.util.Objects.requireNonNull; - -/** - * A value filter using a concept as value. - * - * @param searchParameter the FHIR search parameter code to use for the value - * @param value the concept to search for - */ -public record ExpandedConceptFilter(String searchParameter, TermCode value) implements ExpandedFilter { - - public ExpandedConceptFilter { - requireNonNull(searchParameter); - requireNonNull(value); - } - - @Override - public QueryParams toParams() { - return QueryParams.of(searchParameter, conceptValue(value)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCriterion.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCriterion.java deleted file mode 100644 index 9b62e8d..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedCriterion.java +++ /dev/null @@ -1,48 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.Query; -import de.medizininformatikinitiative.flare.model.mapping.Mapping; -import de.medizininformatikinitiative.flare.model.sq.Criterion; -import de.medizininformatikinitiative.flare.model.sq.TermCode; - -import java.util.Collection; - -import static java.util.Objects.requireNonNull; - -/** - * A criterion that is already expanded from a {@link Criterion} of the structured query. - *

- * Expanded criterion {@link #toQuery() translate} to exactly one {@link Query query} and contain already all - * {@link Mapping mapping information} needed. - * - * @param resourceType the type of the resource like Condition or Observation - * @param filter the filter which can be also a {@link ExpandedFilterGroup group of filters} - */ -public record ExpandedCriterion(String resourceType, ExpandedFilter filter) { - - public ExpandedCriterion { - requireNonNull(resourceType); - requireNonNull(filter); - } - - public static ExpandedCriterion of(String resourceType) { - return new ExpandedCriterion(resourceType, ExpandedFilter.EMPTY); - } - - public static ExpandedCriterion of(String resourceType, String searchParameter, TermCode termCode) { - return new ExpandedCriterion(resourceType, new ExpandedConceptFilter(requireNonNull(searchParameter), - requireNonNull(termCode))); - } - - public ExpandedCriterion appendFilter(ExpandedFilter filter) { - return new ExpandedCriterion(resourceType, this.filter.append(filter)); - } - - public ExpandedCriterion appendFilters(Collection filters) { - return new ExpandedCriterion(resourceType, filters.stream().reduce(filter, ExpandedFilter::append)); - } - - public Query toQuery() { - return new Query(resourceType, filter.toParams()); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedDateComparatorFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedDateComparatorFilter.java deleted file mode 100644 index bef0390..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedDateComparatorFilter.java +++ /dev/null @@ -1,24 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; -import de.medizininformatikinitiative.flare.model.sq.Comparator; - -import java.time.LocalDate; - -import static de.medizininformatikinitiative.flare.model.fhir.QueryParams.dateValue; -import static java.util.Objects.requireNonNull; - -public record ExpandedDateComparatorFilter(String searchParameter, Comparator comparator, LocalDate value) - implements ExpandedFilter { - - public ExpandedDateComparatorFilter { - requireNonNull(searchParameter); - requireNonNull(comparator); - requireNonNull(value); - } - - @Override - public QueryParams toParams() { - return QueryParams.EMPTY.appendParam(searchParameter, dateValue(comparator, value)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedDateRangeFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedDateRangeFilter.java deleted file mode 100644 index 16bc62a..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedDateRangeFilter.java +++ /dev/null @@ -1,27 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; - -import java.time.LocalDate; - -import static de.medizininformatikinitiative.flare.model.fhir.QueryParams.dateValue; -import static de.medizininformatikinitiative.flare.model.sq.Comparator.GREATER_EQUAL; -import static de.medizininformatikinitiative.flare.model.sq.Comparator.LESS_EQUAL; -import static java.util.Objects.requireNonNull; - -public record ExpandedDateRangeFilter(String searchParameter, LocalDate lowerBound, LocalDate upperBound) - implements ExpandedFilter { - - public ExpandedDateRangeFilter { - requireNonNull(searchParameter); - requireNonNull(lowerBound); - requireNonNull(upperBound); - } - - @Override - public QueryParams toParams() { - return QueryParams.EMPTY - .appendParam(searchParameter, dateValue(GREATER_EQUAL, lowerBound)) - .appendParam(searchParameter, dateValue(LESS_EQUAL, upperBound)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedFilter.java deleted file mode 100644 index c8f355a..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedFilter.java +++ /dev/null @@ -1,69 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; -import de.medizininformatikinitiative.flare.model.mapping.Mapping; - -/** - * A filter that already contains {@link Mapping mapping information} like the search parameter. - *

- * Filters can already contain multiple filters that will result in multiple {@link QueryParams query params} of one - * query but not in multiple queries. So a group of filters that should be combined by logical {@literal AND} can be - * represented by one single filter. - */ -public interface ExpandedFilter { - - /** - * The empty filter. - *

- * The empty filter is needed as identity element of the {@link #append(ExpandedFilter) append operation}. - */ - ExpandedFilter EMPTY = new ExpandedFilter() { - - @Override - public ExpandedFilter append(ExpandedFilter filter) { - return filter; - } - - @Override - public ExpandedFilter chain(String searchParameter) { - return EMPTY; - } - - @Override - public QueryParams toParams() { - return QueryParams.EMPTY; - } - }; - - /** - * Appends {@code filter} to this filter. - *

- * This means that all individual filters of this filter will prepend all individual filters of {@code filter}. - * - * @param filter the filter with potentially multiple individual filters to append - * @return a filter containing all individual filters by this filter and {@code filter} - */ - default ExpandedFilter append(ExpandedFilter filter) { - if (filter == ExpandedFilter.EMPTY) { - return this; - } - return ExpandedFilterGroup.of(this).append(filter); - } - - /** - * Returns a new filter with {@code searchParameter} prepended to the chain of search parameters of this filter. - * - * @param searchParameter the search parameter to prepend - * @return a new filter - */ - default ExpandedFilter chain(String searchParameter) { - return new ChainedFilter(searchParameter, this); - } - - /** - * Transforms this filter part into {@link QueryParams query params}. - * - * @return the query params of this filter part - */ - QueryParams toParams(); -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedFilterGroup.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedFilterGroup.java deleted file mode 100644 index cf61bb1..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedFilterGroup.java +++ /dev/null @@ -1,39 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.Util; -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; - -import java.util.List; - -public record ExpandedFilterGroup(List filters) implements ExpandedFilter { - - public ExpandedFilterGroup { - filters = List.copyOf(filters); - } - - public static ExpandedFilterGroup of(ExpandedFilter filter) { - return new ExpandedFilterGroup(List.of(filter)); - } - - public static ExpandedFilterGroup of(ExpandedFilter f1, ExpandedFilter f2) { - return new ExpandedFilterGroup(List.of(f1, f2)); - } - - public static ExpandedFilterGroup of(ExpandedFilter f1, ExpandedFilter f2, ExpandedFilter f3) { - return new ExpandedFilterGroup(List.of(f1, f2, f3)); - } - - @Override - public ExpandedFilter append(ExpandedFilter filter) { - if (filter == ExpandedFilter.EMPTY) { - return this; - } - return new ExpandedFilterGroup(Util.concat(filters, filter instanceof ExpandedFilterGroup - ? ((ExpandedFilterGroup) filter).filters : List.of(filter))); - } - - @Override - public QueryParams toParams() { - return filters.stream().map(ExpandedFilter::toParams).reduce(QueryParams.EMPTY, QueryParams::appendParams); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedQuantityComparatorFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedQuantityComparatorFilter.java deleted file mode 100644 index 75ff4b9..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedQuantityComparatorFilter.java +++ /dev/null @@ -1,23 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; -import de.medizininformatikinitiative.flare.model.sq.Comparator; -import de.medizininformatikinitiative.flare.model.sq.Quantity; - -import static de.medizininformatikinitiative.flare.model.fhir.QueryParams.quantityValue; -import static java.util.Objects.requireNonNull; - -public record ExpandedQuantityComparatorFilter(String searchParameter, Comparator comparator, Quantity value) - implements ExpandedFilter { - - public ExpandedQuantityComparatorFilter { - requireNonNull(searchParameter); - requireNonNull(comparator); - requireNonNull(value); - } - - @Override - public QueryParams toParams() { - return QueryParams.EMPTY.appendParam(searchParameter, quantityValue(comparator, value)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedQuantityRangeFilter.java b/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedQuantityRangeFilter.java deleted file mode 100644 index 931f1c4..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/sq/expanded/ExpandedQuantityRangeFilter.java +++ /dev/null @@ -1,25 +0,0 @@ -package de.medizininformatikinitiative.flare.model.sq.expanded; - -import de.medizininformatikinitiative.flare.model.fhir.QueryParams; -import de.medizininformatikinitiative.flare.model.sq.Quantity; - -import static de.medizininformatikinitiative.flare.model.fhir.QueryParams.quantityValue; -import static de.medizininformatikinitiative.flare.model.sq.Comparator.GREATER_EQUAL; -import static de.medizininformatikinitiative.flare.model.sq.Comparator.LESS_EQUAL; -import static java.util.Objects.requireNonNull; - -public record ExpandedQuantityRangeFilter(String searchParameter, Quantity lowerBound, Quantity upperBound) - implements ExpandedFilter { - - public ExpandedQuantityRangeFilter { - requireNonNull(searchParameter); - requireNonNull(lowerBound); - requireNonNull(upperBound); - } - - @Override - public QueryParams toParams() { - return QueryParams.of(searchParameter, quantityValue(GREATER_EQUAL, lowerBound)) - .appendParam(searchParameter, quantityValue(LESS_EQUAL, upperBound)); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/translate/Expression.java b/src/main/java/de/medizininformatikinitiative/flare/model/translate/Expression.java deleted file mode 100644 index e7bbd4a..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/translate/Expression.java +++ /dev/null @@ -1,10 +0,0 @@ -package de.medizininformatikinitiative.flare.model.translate; - -import de.medizininformatikinitiative.flare.model.sq.StructuredQuery; - -/** - * Expression used in {@link StructuredQueryService#translate(StructuredQuery) translate} to render expressions used in - * the query execution. - */ -public interface Expression { -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/translate/Operator.java b/src/main/java/de/medizininformatikinitiative/flare/model/translate/Operator.java deleted file mode 100644 index 778aa49..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/translate/Operator.java +++ /dev/null @@ -1,119 +0,0 @@ -package de.medizininformatikinitiative.flare.model.translate; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.List; -import java.util.stream.Stream; - -import static java.util.Objects.requireNonNull; - -/** - * Operator expression that consists of a {@code name} and a list of {@code operands}. - *

- * There are currently the different kind of operators defined in the {@link Name} enum. If new kinds will be added, - * there should be also new constructor methods. - * - * @param name the name of the operator - * @param operands the operands which are itself expressions - */ -@JsonIgnoreProperties({"empty"}) -public record Operator(Name name, List operands) implements Expression { - - public Operator { - requireNonNull(name); - if (operands.isEmpty()) { - throw new IllegalArgumentException("empty operands"); - } - operands = List.copyOf(operands); - } - - /** - * Creates a new {@code difference} operator. - * - * @param o1 the first operand - * @param o2 the second operand - * @return the new difference operator - */ - public static Operator difference(Expression o1, Expression o2) { - return new Operator<>(Name.DIFFERENCE, List.of(o1, o2)); - } - - /** - * Creates a new {@code intersection} operator. - * - * @param o1 the first operand - * @return the new intersection operator - */ - public static Operator intersection(T o1) { - return new Operator<>(Name.INTERSECTION, List.of(o1)); - } - - /** - * Creates a new {@code intersection} operator. - * - * @param o1 the first operand - * @param o2 the second operand - * @return the new intersection operator - */ - public static Operator intersection(T o1, T o2) { - return new Operator<>(Name.INTERSECTION, List.of(o1, o2)); - } - - /** - * Creates a new {@code intersection} operator. - * - * @param firstOperand the first operand - * @param moreOperands more operands - * @return the new intersection operator - */ - public static Operator intersection(T firstOperand, List moreOperands) { - return new Operator<>(Name.INTERSECTION, Stream.concat(Stream.of(firstOperand), moreOperands.stream()).toList()); - } - - /** - * Creates a new {@code union} operator. - * - * @param o1 the first operand - * @return the new union operator - */ - public static Operator union(T o1) { - return new Operator<>(Name.UNION, List.of(o1)); - } - - /** - * Creates a new {@code union} operator. - * - * @param o1 the first operand - * @param o2 the second operand - * @return the new union operator - */ - public static Operator union(T o1, T o2) { - return new Operator<>(Name.UNION, List.of(o1, o2)); - } - - /** - * Creates a new {@code union} operator. - * - * @param firstOperand the first operand - * @param moreOperands more operands - * @return the new union operator - */ - public static Operator union(T firstOperand, List moreOperands) { - return new Operator<>(Name.UNION, Stream.concat(Stream.of(firstOperand), moreOperands.stream()).toList()); - } - - public Operator add(T operand) { - return new Operator<>(name, Stream.concat(this.operands.stream(), Stream.of(operand)).toList()); - } - - public Operator addAll(List operands) { - return new Operator<>(name, Stream.concat(this.operands.stream(), operands.stream()).toList()); - } - - public enum Name { - @JsonProperty("difference") DIFFERENCE, - @JsonProperty("intersection") INTERSECTION, - @JsonProperty("union") UNION - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/translate/QueryExpression.java b/src/main/java/de/medizininformatikinitiative/flare/model/translate/QueryExpression.java deleted file mode 100644 index 22cb038..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/model/translate/QueryExpression.java +++ /dev/null @@ -1,28 +0,0 @@ -package de.medizininformatikinitiative.flare.model.translate; - -import com.fasterxml.jackson.annotation.JsonValue; -import de.medizininformatikinitiative.flare.model.fhir.Query; - -import static java.util.Objects.requireNonNull; - -/** - * Expression that holds a single query. - * - * @param query the query - */ -public record QueryExpression(Query query) implements Expression { - - public QueryExpression { - requireNonNull(query); - } - - /** - * The JSON value of a query expression is just the query string. - * - * @return a string representation of this query expression. - */ - @JsonValue - public String toJson() { - return "[base]/" + query.toString(); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/service/FhirQueryService.java b/src/main/java/de/medizininformatikinitiative/flare/service/FhirQueryService.java deleted file mode 100644 index 7b50866..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/service/FhirQueryService.java +++ /dev/null @@ -1,14 +0,0 @@ -package de.medizininformatikinitiative.flare.service; - -import de.medizininformatikinitiative.flare.model.Population; -import de.medizininformatikinitiative.flare.model.fhir.Query; -import reactor.core.publisher.Mono; - -public interface FhirQueryService { - - Mono execute(Query query, boolean ignoreCache); - - default Mono execute(Query query) { - return execute(query, false); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/flare/service/SerializerException.java b/src/main/java/de/medizininformatikinitiative/flare/service/SerializerException.java deleted file mode 100644 index 4163f9c..0000000 --- a/src/main/java/de/medizininformatikinitiative/flare/service/SerializerException.java +++ /dev/null @@ -1,8 +0,0 @@ -package de.medizininformatikinitiative.flare.service; - -public class SerializerException extends Exception { - - public SerializerException(String message) { - super(message); - } -} diff --git a/src/main/java/de/medizininformatikinitiative/torch/CdsStructureDefinitionHandler.java b/src/main/java/de/medizininformatikinitiative/torch/CdsStructureDefinitionHandler.java index f229002..6a1d210 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/CdsStructureDefinitionHandler.java +++ b/src/main/java/de/medizininformatikinitiative/torch/CdsStructureDefinitionHandler.java @@ -1,10 +1,11 @@ package de.medizininformatikinitiative.torch; +import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; import de.medizininformatikinitiative.torch.util.ResourceReader; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.CanonicalType; +import org.hl7.fhir.r4.model.StructureDefinition; import org.springframework.stereotype.Component; -import ca.uhn.fhir.context.FhirContext; import java.io.File; import java.io.IOException; @@ -17,18 +18,14 @@ public class CdsStructureDefinitionHandler { public FhirContext ctx; private HashMap definitionsMap = new HashMap<>(); - public CdsStructureDefinitionHandler(FhirContext ctx, String fileDirectory) { + public CdsStructureDefinitionHandler(String fileDirectory) { try { processDirectory(fileDirectory); } catch (IOException e) { throw new RuntimeException(e); } - this.ctx = ctx; } - public CdsStructureDefinitionHandler(FhirContext ctx) { - this.ctx = ctx; - } /** * Reads a StructureDefinition from a file and stores it in the definitionsMap diff --git a/src/main/java/de/medizininformatikinitiative/torch/ConsentHandler.java b/src/main/java/de/medizininformatikinitiative/torch/ConsentHandler.java new file mode 100644 index 0000000..ae811ad --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/ConsentHandler.java @@ -0,0 +1,332 @@ +package de.medizininformatikinitiative.torch; + +import ca.uhn.fhir.context.FhirContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import de.medizininformatikinitiative.torch.exceptions.PatientIdNotFoundException; +import de.medizininformatikinitiative.torch.util.*; +import de.medizininformatikinitiative.torch.service.DataStore; +import org.hl7.fhir.r4.model.*; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + +import java.io.File; +import java.io.IOException; +import java.util.*; + +/** + * The {@code ConsentHandler} class is responsible for managing and verifying patient consents + * within the Torch application. + *

Key functionalities include: + *

    + *
  • Checking patient consent based on FHIR resources.
  • + *
  • Building consent information for a batch of patients.
  • + *
  • Updating consent periods based on patient encounters.
  • + *
+ * + * @see DataStore + * @see ConsentCodeMapper + * @see ConsentProcessor + */ +@Component +public class ConsentHandler { + + private static final Logger logger = LoggerFactory.getLogger(ConsentHandler.class); + private final DataStore dataStore; + private final ConsentCodeMapper mapper; + private final JsonNode mappingProfiletoDateField; + private final FhirContext ctx; + private final FhirPathBuilder fhirPathBuilder; + private final CdsStructureDefinitionHandler cdsStructureDefinitionHandler; + private final ConsentProcessor consentProcessor; + + /** + * Constructs a new {@code ConsentHandler} with the specified dependencies. + * + * @param dataStore The {@link DataStore} service for Server Calls. + * @param mapper The {@link ConsentCodeMapper} for mapping consent codes. + * @param profilePath The file system path to the consent profile mapping configuration. + * @param cdsStructureDefinitionHandler The {@link CdsStructureDefinitionHandler} for handling structure definitions. + * @throws IOException If an error occurs while reading the mapping profile file. + */ + @Autowired + public ConsentHandler(DataStore dataStore, ConsentCodeMapper mapper, String profilePath, CdsStructureDefinitionHandler cdsStructureDefinitionHandler) throws IOException { + this.dataStore = dataStore; + this.mapper = mapper; + this.ctx = ResourceReader.ctx; + this.fhirPathBuilder = new FhirPathBuilder(cdsStructureDefinitionHandler); + this.cdsStructureDefinitionHandler = cdsStructureDefinitionHandler; + this.consentProcessor = new ConsentProcessor(ctx); + ObjectMapper objectMapper = new ObjectMapper(); + mappingProfiletoDateField = objectMapper.readTree(new File(profilePath).getAbsoluteFile()); + } + + /** + * Checks whether the provided {@link DomainResource} complies with the patient's consents. + * + *

This method evaluates the resource against the consent information to determine if access + * should be granted based on the defined consent periods. + * + * @param resource The FHIR {@link DomainResource} to check for consent compliance. + * @param consentInfo A map containing consent information structured by patient ID and consent codes. + * @return {@code true} if the resource complies with the consents; {@code false} otherwise. + */ + public Boolean checkConsent(@NotNull DomainResource resource, Map>> consentInfo) { + logger.trace("Checking Consent for {}", resource.getResourceType()); + Iterator profileIterator = resource.getMeta().getProfile().iterator(); + JsonNode fieldValue = null; + StructureDefinition.StructureDefinitionSnapshotComponent snapshot = null; + + logger.trace("Checking consent for resource of type: {} with {} profiles", resource.getResourceType(), resource.getMeta().getProfile().size()); + + while (profileIterator.hasNext()) { + String profile = profileIterator.next().asStringValue(); + logger.trace("Evaluating profile: {}", profile); + + if (mappingProfiletoDateField.has(profile)) { + logger.trace("Handling the following Profile {}", profile); + fieldValue = mappingProfiletoDateField.get(profile); + logger.trace("Fieldvalue {}", fieldValue); + snapshot = cdsStructureDefinitionHandler.getSnapshot(profile); + logger.trace("Profile matched. FieldValue for profile {}: {}", profile, fieldValue); + break; // Exit after finding the first match + } + } + + if (fieldValue == null) { + logger.warn("No matching profile found for resource of type: {}", resource.getResourceType()); + return false; + } + + if (fieldValue.asText().isEmpty()) { + logger.trace("Field value is empty, consent is automatically granted if patient has consents in general."); + return true; + } else { + logger.trace("Fieldvalue to be handled {} as FhirPath", fieldValue.asText()); + List values = ctx.newFhirPath().evaluate(resource, fhirPathBuilder.handleSlicingForFhirPath(fieldValue.asText(), snapshot), Base.class); + logger.trace("Evaluated FHIRPath expression, found {} values.", values.size()); + + for (Base value : values) { + DateTimeType resourceStart; + DateTimeType resourceEnd; + + if (value instanceof DateTimeType) { + resourceStart = (DateTimeType) value; + resourceEnd = (DateTimeType) value; + logger.trace("Evaluated value is DateTimeType: start {}, end {}", resourceStart, resourceEnd); + } else if (value instanceof Period) { + resourceStart = ((Period) value).getStartElement(); + resourceEnd = ((Period) value).getEndElement(); + logger.trace("Evaluated value is Period: start {}, end {}", resourceStart, resourceEnd); + } else { + logger.error("No valid Date Time Value found. Value: {}", value); + throw new IllegalArgumentException("No valid Date Time Value found"); + } + + String patientID = null; + try { + patientID = ResourceUtils.getPatientId(resource); + } catch (PatientIdNotFoundException e) { + logger.warn("Resource does not Contain any Patient Reference {}", resource.getIdElement()); + return false; + } + + logger.trace("Patient ID {} and Set {} ", patientID, consentInfo.keySet()); + logger.trace("Get Result {}", consentInfo.get(patientID)); + + boolean hasValidConsent = Optional.ofNullable(consentInfo.get(patientID)) + .map(consentPeriodMap -> consentPeriodMap.entrySet().stream() + .allMatch(innerEntry -> { + String code = innerEntry.getKey(); + List consentPeriods = innerEntry.getValue(); + logger.debug("Checking {} consent periods for code: {}", consentPeriods.size(), code); + + // Check if at least one consent period is valid for the current code + return consentPeriods.stream() + .anyMatch(period -> { + logger.trace("Evaluating ConsentPeriod: start {}, end {} vs {} and {}", + resourceStart, resourceEnd, period.getStart(), period.getEnd()); + logger.debug("Result: {}", resourceStart.after(period.getStartElement()) && resourceEnd.before(period.getEndElement())); + return resourceStart.after(period.getStartElement()) && resourceEnd.before(period.getEndElement()); + }); + })) + .orElse(false); + + if (hasValidConsent) { + logger.debug("Valid consent period found for evaluated values."); + return true; + } + } + logger.debug("No valid consent period found for any value."); + return false; // No matching consent period found + } + } + + /** + * Builds consent information for a batch of patients based on the provided key and patient IDs. + * + *

This method retrieves relevant consent resources, processes them, and structures the consent + * information in a map organized by patient ID and consent codes. + * + * @param key A string key used to retrieve relevant consent codes from the {@link ConsentCodeMapper}. + * @param batch A list of patient IDs to process in this batch. + * @return A {@link Flux} emitting maps containing consent information structured by patient ID and consent codes. + */ + public Flux>>> buildingConsentInfo(String key, @NotNull List batch) { + // Retrieve the relevant codes for the given key + Set codes = mapper.getRelevantCodes(key); + + logger.trace("Starting to build consent info for key: {} with batch size: {}", key, batch.size()); + + // Fetch resources using a bounded elastic scheduler for offloading blocking HTTP I/O + return dataStore.getResources("Consent", FhirSearchBuilder.getConsent(batch)) + .subscribeOn(Schedulers.boundedElastic()) // Offload the HTTP requests + .doOnSubscribe(subscription -> logger.debug("Fetching resources for batch: {}", batch)) + .doOnNext(resource -> logger.trace("Resource fetched for ConsentBuild: {}", resource.getIdElement().getIdPart())) + .onErrorResume(e -> { + logger.error("Error fetching resources for parameters: {}", FhirSearchBuilder.getConsent(batch), e); + return Flux.empty(); + }) + + .map(resource -> { + try { + DomainResource domainResource = (DomainResource) resource; + String patient = ResourceUtils.getPatientId(domainResource); + + logger.trace("Processing resource for patient: {} {}", patient, resource.getResourceType()); + + Map> consents = consentProcessor.transformToConsentPeriodByCode(domainResource, codes); + + Map>> patientConsentMap = new HashMap<>(); + patientConsentMap.put(patient, new HashMap<>()); + + // Log consent periods transformation + logger.trace("Transformed resource into {} consent periods for patient: {}", consents.size(), patient); + + // Iterate over the consent periods and add them to the patient's map + consents.forEach((code, newConsentPeriods) -> { + patientConsentMap.get(patient) + .computeIfAbsent(code, k -> new ArrayList<>()) + .addAll(newConsentPeriods); + }); + + logger.trace("Consent periods updated for patient: {} with {} codes", patient, consents.size()); + + // Return the map containing the patient's consent periods + return patientConsentMap; + } catch (Exception e) { + logger.error("Error processing resource", e); + throw new RuntimeException(e); + } + }) + + .collectList() + .doOnSuccess(list -> logger.trace("Successfully processed {} resources for buildingConsentInfo", list.size())) + + .flatMapMany(Flux::fromIterable); + } + + /** + * Updates consent periods based on patient encounters for a given batch. + * + *

This method retrieves all encounters associated with the patients in the batch and updates + * their consent periods accordingly. It ensures that consents are valid in the context of the + * patient's encounters. + * + * @param consentInfoFlux A {@link Flux} emitting maps of consent information structured by patient ID and consent codes. + * @param batch A list of patient IDs to process in this batch. + * @return A {@link Flux} emitting updated maps of consent information. + */ + public Flux>>> updateConsentPeriodsByPatientEncounters( + Flux>>> consentInfoFlux, @NotNull List batch) { + + logger.info("Starting to update consent info with batch size: {}", batch.size()); + + // Step 1: Fetch all encounters for the batch of patients + Flux allEncountersFlux = dataStore.getResources("Encounter", FhirSearchBuilder.getEncounter(batch)) + .subscribeOn(Schedulers.boundedElastic()) + .cast(Encounter.class) + .doOnSubscribe(subscription -> logger.debug("Fetching encounters for batch: {}", batch)) + .doOnNext(encounter -> logger.trace("Encounter fetched: {}", encounter.getIdElement().getIdPart())) + .onErrorResume(e -> { + logger.error("Error fetching encounters for batch: {}", batch, e); + return Flux.empty(); + }); + + // Step 2: Group the encounters by patient ID + Mono>> encountersByPatientMono = allEncountersFlux + .flatMap(encounter -> { + try { + String patientId = ResourceUtils.getPatientId(encounter); + return Mono.just(new AbstractMap.SimpleEntry<>(patientId, encounter)); + } catch (PatientIdNotFoundException e) { + logger.error("Patient ID not found in encounter resource", e); + return Mono.empty(); + } + }) + .collectMultimap( + Map.Entry::getKey, + Map.Entry::getValue + ); + + // Step 3: Process each patient's consent info individually + return encountersByPatientMono.flatMapMany(encountersByPatientMap -> + consentInfoFlux.flatMap(patientConsentInfo -> { + + String patientId = patientConsentInfo.keySet().stream().findFirst().orElse(null); + + if (patientId == null) { + logger.warn("Patient ID not found in consent info"); + return Mono.just(patientConsentInfo); // Or handle as appropriate + } + + List patientEncounters = (List) encountersByPatientMap.get(patientId); + + if (patientEncounters == null || patientEncounters.isEmpty()) { + logger.info("No encounters found for patient {}", patientId); + // No encounters for this patient, return the consent info as is + return Mono.just(patientConsentInfo); + } + + return Mono.fromCallable(() -> { + updateConsentPeriodsByPatientEncounters(patientConsentInfo.get(patientId), patientEncounters); + return patientConsentInfo; + }).subscribeOn(Schedulers.boundedElastic()); + }) + ); + } + + /** + * Helper method to update consent periods for a patient based on their encounters. + * + *

This method adjusts the start dates of consent periods to align with the start dates of the patient's + * encounters, ensuring that consents are valid during the periods of active encounters. + * + * @param patientConsentInfo A map of consent codes to their corresponding periods for a specific patient. + * @param encounters A list of {@link Encounter} resources associated with the patient. + */ + private void updateConsentPeriodsByPatientEncounters( + Map> patientConsentInfo, @NotNull List encounters) { + + for (Encounter encounter : encounters) { + Period encounterPeriod = encounter.getPeriod(); + + for (Map.Entry> entry : patientConsentInfo.entrySet()) { + List consentPeriods = entry.getValue(); + + for (Period consentPeriod : consentPeriods) { + if (encounterPeriod.getStartElement().before(consentPeriod.getStartElement()) && + encounterPeriod.getEndElement().after(consentPeriod.getStartElement())) { + consentPeriod.setStartElement(encounterPeriod.getStartElement()); + } + } + } + } + } +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/DataStore.java b/src/main/java/de/medizininformatikinitiative/torch/DataStore.java deleted file mode 100644 index 2177e08..0000000 --- a/src/main/java/de/medizininformatikinitiative/torch/DataStore.java +++ /dev/null @@ -1,64 +0,0 @@ -package de.medizininformatikinitiative.torch; - -import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.r4.model.Bundle; -import org.hl7.fhir.r4.model.Resource; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Component; -import org.springframework.web.reactive.function.client.WebClient; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -import java.net.URI; -import java.util.Optional; - -@Component -public class DataStore { - private static final Logger logger = LoggerFactory.getLogger(DataStore.class); - - private final WebClient client; - private final FhirContext fhirContext; - - @Autowired - public DataStore(@Qualifier("fhirClient") WebClient client, FhirContext fhirContext) { - this.client = client; - this.fhirContext = fhirContext; - } - - /** - * Executes {@code FHIRSearchQuery} and returns all resources found with that query. - * - * @param parameters the fhir search query parameters defining the patient resources to be fetched - * @return the resources found with the {@param FHIRSearchQuery} - */ - public Flux getResources(String resourceType,String parameters) { - //logger.debug("Search Parameters{}", parameters); - - - return client.post() - .uri("/"+resourceType+"/_search") - .bodyValue(parameters) - .header("Content-Type", "application/x-www-form-urlencoded") - .retrieve() - .bodyToMono(String.class) - .doOnNext(response -> logger.debug("getResources Response: {}", response)) - .flatMap(response -> Mono.just(fhirContext.newJsonParser().parseResource(Bundle.class, response))) - .expand(bundle -> Optional.ofNullable(bundle.getLink("next")) - .map(link -> fetchPage(client, link.getUrl())) - .orElse(Mono.empty())) - .flatMap(bundle -> Flux.fromStream(bundle.getEntry().stream().map(Bundle.BundleEntryComponent::getResource))); - } - - private Mono fetchPage(WebClient client, String url) { - //logger.debug("Fetch Page {}", url); - return client.get() - .uri(URI.create(url)) - .retrieve() - .bodyToMono(String.class) - .map(response -> fhirContext.newJsonParser().parseResource(Bundle.class, response)); - } - -} diff --git a/src/main/java/de/medizininformatikinitiative/torch/ResourceTransformer.java b/src/main/java/de/medizininformatikinitiative/torch/ResourceTransformer.java index 3c45230..ce1f860 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/ResourceTransformer.java +++ b/src/main/java/de/medizininformatikinitiative/torch/ResourceTransformer.java @@ -5,9 +5,11 @@ import de.medizininformatikinitiative.torch.model.Attribute; import de.medizininformatikinitiative.torch.model.AttributeGroup; import de.medizininformatikinitiative.torch.model.Crtdl; +import de.medizininformatikinitiative.torch.service.DataStore; import de.medizininformatikinitiative.torch.util.*; import org.hl7.fhir.r4.model.DomainResource; import org.hl7.fhir.r4.model.Patient; +import org.hl7.fhir.r4.model.Period; import org.hl7.fhir.r4.model.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -19,8 +21,6 @@ import java.lang.reflect.InvocationTargetException; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; import java.util.stream.Collectors; @Component @@ -31,16 +31,18 @@ public class ResourceTransformer { private final DataStore dataStore; private final ElementCopier copier; private final Redaction redaction; + private final ConsentHandler handler; private final FhirSearchBuilder searchBuilder = new FhirSearchBuilder(); - + @Autowired - public ResourceTransformer(DataStore dataStore, CdsStructureDefinitionHandler cds) { + public ResourceTransformer(DataStore dataStore, CdsStructureDefinitionHandler cds, ConsentHandler handler) { this.dataStore = dataStore; this.copier = new ElementCopier(cds); this.redaction = new Redaction(cds); + this.handler = handler; } - public Flux transformResources(String parameters, AttributeGroup group) { + public Flux transformResources(String parameters, AttributeGroup group, Map>> consentmap) { String resourceType = group.getResourceType(); // Offload the HTTP call to a bounded elastic scheduler to handle blocking I/O @@ -52,103 +54,143 @@ public Flux transformResources(String parameters, AttributeGroup group return Flux.empty(); // Return an empty Flux to continue processing without crashing the pipeline }); - return resources.map(resource -> { - try { - - return transform((DomainResource) resource, group); - } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | - InstantiationException e) { - logger.error("Transform error ", e); - throw new RuntimeException(e); - } catch (MustHaveViolatedException e) { - Patient empty = new Patient(); - logger.error("Empty Transformation {}", empty.isEmpty()); - return empty; - } + // Transform resources based on consentmap availability + if (consentmap.isEmpty()) { + // No consent map available, process resources without consent checks + return resources.flatMap(resource -> { + try { + return Mono.just(transform((DomainResource) resource, group)); + } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException e) { + logger.error("Transform error: ", e); + return Mono.error(new RuntimeException(e)); + } catch (MustHaveViolatedException e) { + Patient empty = new Patient(); + logger.error("Empty Transformation: {}", empty.isEmpty()); + return Mono.just(empty); + } + }); + } else { + // Consent map is available, apply consent checks + return resources.flatMap(resource -> { + try { + if (handler.checkConsent((DomainResource) resource, consentmap)) { + return Mono.just(transform((DomainResource) resource, group)); + } else { + // Return empty resource when consent is violated + Patient empty = new Patient(); + return Mono.just(empty); + } + } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException e) { + logger.error("Transform error: ", e); + return Mono.error(new RuntimeException(e)); + } catch (MustHaveViolatedException e) { + Patient empty = new Patient(); + logger.error("Empty Transformation: {}", empty.isEmpty()); + return Mono.just(empty); + } + }); + } + } - }); - } public Resource transform(DomainResource resourcesrc, AttributeGroup group) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException, MustHaveViolatedException { Class resourceClass = resourcesrc.getClass().asSubclass(DomainResource.class); DomainResource tgt = resourceClass.getDeclaredConstructor().newInstance(); try { - logger.debug("Handling resource {}",ResourceUtils.getPatientId(resourcesrc)); + logger.trace("Handling resource {}", ResourceUtils.getPatientId(resourcesrc)); for (Attribute attribute : group.getAttributes()) { copier.copy(resourcesrc, tgt, attribute); - } - //TODO define technically required in all Ressources - copier.copy(resourcesrc, tgt, new Attribute("meta.profile", true)); - copier.copy(resourcesrc, tgt, new Attribute("id", true)); - //TODO Handle Custom ENUM Types like Status, since it has its Error in the valuesystem. - if (resourcesrc.getClass() == org.hl7.fhir.r4.model.Observation.class) { - copier.copy(resourcesrc, tgt, new Attribute("status", true)); - } - if (resourcesrc.getClass() != org.hl7.fhir.r4.model.Patient.class) { - copier.copy(resourcesrc, tgt, new Attribute("subject.reference", true)); - } + } + //TODO define technically required in all Ressources + copier.copy(resourcesrc, tgt, new Attribute("meta.profile", true)); + copier.copy(resourcesrc, tgt, new Attribute("id", true)); + //TODO Handle Custom ENUM Types like Status, since it has its Error in the valuesystem. + if (resourcesrc.getClass() == org.hl7.fhir.r4.model.Observation.class) { + copier.copy(resourcesrc, tgt, new Attribute("status", true)); + } + if (resourcesrc.getClass() != org.hl7.fhir.r4.model.Patient.class && resourcesrc.getClass() != org.hl7.fhir.r4.model.Consent.class) { + copier.copy(resourcesrc, tgt, new Attribute("subject.reference", true)); + } + if(resourcesrc.getClass() == org.hl7.fhir.r4.model.Consent.class){ + copier.copy(resourcesrc, tgt, new Attribute("patient.reference", true)); + } - redaction.redact(tgt); + redaction.redact(tgt); } catch (PatientIdNotFoundException e) { throw new RuntimeException(e); } return tgt; } - public Mono>> collectResourcesByPatientReference(Crtdl crtdl, List patients) { - //logger.debug("Starting collectResourcesByPatientReference"); - //logger.debug("Patients Received: {}", patients); + public Mono>> collectResourcesByPatientReference(Crtdl crtdl, List batch) { + logger.trace("Starting collectResourcesByPatientReference"); + logger.trace("Patients Received: {}", batch); - // Set of Pat Ids that survived so far - Set safeSet = new HashSet<>(patients); + // Fetch consent key + String key = crtdl.getConsentKey(); - // Wrapping the entire operation in a reactive pipeline without blocking - return Flux.fromIterable(crtdl.getDataExtraction().getAttributeGroups()) - .flatMap(group -> { - // Set of PatIds that survived for this group - Set safeGroup = new HashSet<>(); - if (!group.hasMustHave()) { - safeGroup.addAll(patients); - } + // Initialize consentmap: fetch consent information reactively or return empty if no consent is needed + Flux>>> consentmap = key.isEmpty() ? + Flux.empty() : handler.updateConsentPeriodsByPatientEncounters(handler.buildingConsentInfo(key, batch),batch); + + // Set of patient IDs that survived so far + Set safeSet = new HashSet<>(batch); + + return consentmap.switchIfEmpty(Flux.just(Collections.emptyMap())) // Handle case where no consent is required + .flatMap(finalConsentmap -> { - // Handling the entire patients list as a batch - return transformResources(searchBuilder.getSearchBatch(group, patients), group) - .filter(resource -> !resource.isEmpty()) - .collectMultimap(resource -> { - try { - String id = ResourceUtils.getPatientId((DomainResource) resource); - safeGroup.add(id); - return id; - } catch (PatientIdNotFoundException e) { - logger.error("PatientIdNotFoundException: {}", e.getMessage()); - throw new RuntimeException(e); + // Collect the attribute groups for each batch + return Flux.fromIterable(crtdl.getDataExtraction().getAttributeGroups()) + .flatMap(group -> { + // Set of patient IDs that survived for this group + Set safeGroup = new HashSet<>(); + if (!group.hasMustHave()) { + safeGroup.addAll(batch); // No constraints, all patients are initially safe } - }) - .doOnNext(map -> { - safeSet.retainAll(safeGroup); // Retain only the patients that are present in both sets + + // Handle each group reactively + return transformResources(searchBuilder.getSearchParam(group, batch), group, finalConsentmap) + .filter(resource -> !resource.isEmpty()) + .collectMultimap(resource -> { + try { + String id = ResourceUtils.getPatientId((DomainResource) resource); + safeGroup.add(id); + return id; + } catch (PatientIdNotFoundException e) { + logger.error("PatientIdNotFoundException: {}", e.getMessage()); + throw new RuntimeException(e); + } + }) + .doOnNext(map -> { + safeSet.retainAll(safeGroup); // Retain only the patients present in both sets + }); }); }) .collectList() - .map(resourceLists -> { - // Combining all resource lists into a single map - return resourceLists.stream() - .flatMap(map -> map.entrySet().stream()) - .filter(entry -> safeSet.contains(entry.getKey())) // Ensure the entry key is in the safe set - .collect(Collectors.toMap( - Map.Entry::getKey, - Map.Entry::getValue, - (existing, replacement) -> { - existing.addAll(replacement); - return existing; - } - )); - }) - .doOnSuccess(result -> logger.debug("Successfully collected resources {}", result.entrySet())) + .map(resourceLists -> resourceLists.stream() + .flatMap(map -> map.entrySet().stream()) + .filter(entry -> safeSet.contains(entry.getKey())) // Filter by the safe set + .collect(Collectors.toMap( + Map.Entry::getKey, + Map.Entry::getValue, + (existing, replacement) -> { + existing.addAll(replacement); + return existing; + } + )) + ) + .doOnSuccess(result -> logger.debug("Successfully collected resources {}", result)) .doOnError(error -> logger.error("Error collecting resources: {}", error.getMessage())); } + + + + + + } diff --git a/src/main/java/de/medizininformatikinitiative/torch/Torch.java b/src/main/java/de/medizininformatikinitiative/torch/Torch.java index 930dc7c..9ab9152 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/Torch.java +++ b/src/main/java/de/medizininformatikinitiative/torch/Torch.java @@ -3,6 +3,16 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; +import org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager; +import org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService; +import org.springframework.security.oauth2.client.registration.ClientRegistrations; +import org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository; +import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction; +import org.springframework.web.reactive.function.client.ExchangeFilterFunction; + + +import static org.springframework.security.oauth2.core.AuthorizationGrantType.CLIENT_CREDENTIALS; + @SpringBootApplication @ComponentScan(basePackages = { diff --git a/src/main/java/de/medizininformatikinitiative/torch/config/AppConfig.java b/src/main/java/de/medizininformatikinitiative/torch/config/AppConfig.java index fbace35..f028e7e 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/config/AppConfig.java +++ b/src/main/java/de/medizininformatikinitiative/torch/config/AppConfig.java @@ -5,30 +5,84 @@ import com.fasterxml.jackson.databind.ObjectMapper; import de.medizininformatikinitiative.torch.BundleCreator; import de.medizininformatikinitiative.torch.CdsStructureDefinitionHandler; -import de.medizininformatikinitiative.torch.DataStore; import de.medizininformatikinitiative.torch.ResourceTransformer; +import de.medizininformatikinitiative.torch.cql.CqlClient; +import de.medizininformatikinitiative.torch.cql.FhirConnector; +import de.medizininformatikinitiative.torch.cql.FhirHelper; +import de.medizininformatikinitiative.torch.*; +import de.medizininformatikinitiative.torch.model.mapping.DseMappingTreeBase; +import de.medizininformatikinitiative.torch.model.mapping.DseTreeRoot; import de.medizininformatikinitiative.torch.rest.CapabilityStatementController; +import de.medizininformatikinitiative.torch.util.ConsentCodeMapper; +import de.medizininformatikinitiative.torch.service.DataStore; import de.medizininformatikinitiative.torch.util.ElementCopier; import de.medizininformatikinitiative.torch.util.Redaction; import de.medizininformatikinitiative.torch.util.ResultFileManager; +import de.numcodex.sq2cql.Translator; +import de.numcodex.sq2cql.model.Mapping; +import de.numcodex.sq2cql.model.MappingContext; +import de.numcodex.sq2cql.model.MappingTreeBase; +import de.numcodex.sq2cql.model.MappingTreeModuleRoot; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; +import org.springframework.context.annotation.Profile; import org.springframework.http.client.reactive.ReactorClientHttpConnector; +import org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager; +import org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService; +import org.springframework.security.oauth2.client.registration.ClientRegistrations; +import org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository; +import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction; +import org.springframework.web.reactive.function.client.ExchangeFilterFunction; +import org.springframework.web.reactive.function.client.ExchangeFilterFunctions; import org.springframework.web.reactive.function.client.WebClient; import reactor.netty.http.client.HttpClient; import reactor.netty.resources.ConnectionProvider; +import java.io.File; +import java.io.IOException; +import java.time.Clock; +import java.util.Arrays; +import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static java.util.Map.entry; +import static org.springframework.security.oauth2.core.AuthorizationGrantType.CLIENT_CREDENTIALS; +import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.REGISTRATION_ID; @Configuration +@Profile("active") public class AppConfig { + private static final Logger logger = LoggerFactory.getLogger(AppConfig.class); + + @Value("${torch.mappingsFile}") + private String mappingsFile; + @Value("${torch.conceptTreeFile}") + private String conceptTreeFile; + @Value("${torch.dseMappingTreeFile}") + private String dseMappingTreeFile; + + + @Bean + public ObjectMapper objectMapper() { + return new ObjectMapper(); + } @Bean @Qualifier("fhirClient") - public WebClient fhirWebClient(@Value("${torch.fhir.url}") String baseUrl) { + public WebClient fhirWebClient(@Value("${torch.fhir.url}") String baseUrl, + @Qualifier("oauth") ExchangeFilterFunction oauthExchangeFilterFunction, @Value("${torch.fhir.user}") String user, + @Value("${torch.fhir.password}") String password) { + logger.info("Initializing FHIR WebClient with URL: {}", baseUrl); + ConnectionProvider provider = ConnectionProvider.builder("data-store") .maxConnections(4) .pendingAcquireMaxCount(500) @@ -39,12 +93,21 @@ public WebClient fhirWebClient(@Value("${torch.fhir.url}") String baseUrl) { .clientConnector(new ReactorClientHttpConnector(httpClient)) .defaultHeader("Accept", "application/fhir+json"); - return builder.build(); + if (!user.isEmpty() && !password.isEmpty()) { + builder = builder.filter(ExchangeFilterFunctions.basicAuthentication(user, password)); + logger.info("Added basic authentication for user: {}", user); + }else{ + logger.info("Using OAuth"); + } + + return builder.filter(oauthExchangeFilterFunction).build(); } @Bean @Qualifier("flareClient") public WebClient flareWebClient(@Value("${torch.flare.url}") String baseUrl) { + logger.info("Initializing Flare WebClient with URL: {}", baseUrl); + ConnectionProvider provider = ConnectionProvider.builder("data-store") .maxConnections(4) .pendingAcquireMaxCount(500) @@ -59,8 +122,72 @@ public WebClient flareWebClient(@Value("${torch.flare.url}") String baseUrl) { } @Bean - public DataStore dataStore(@Qualifier("fhirClient") WebClient client, FhirContext context) { - return new DataStore(client, context); + public ConsentCodeMapper consentCodeMapper( @Value("${torch.mapping.consent}") String consentFilePath) throws IOException { + return new ConsentCodeMapper(consentFilePath); + } + + @Bean + public DataStore dataStore(@Qualifier("fhirClient") WebClient client, FhirContext context, @Qualifier("systemDefaultZone") Clock clock, + @Value("${torch.fhir.pageCount}") int pageCount) { + return new DataStore(client, context, clock, pageCount); + } + + @Bean + public DseMappingTreeBase dseMappingTreeBase(ObjectMapper jsonUtil) throws IOException { + return new DseMappingTreeBase(Arrays.stream(jsonUtil.readValue(new File(dseMappingTreeFile), DseTreeRoot[].class)).toList()); + } + + @Lazy + @Bean + Translator createCqlTranslator( ObjectMapper jsonUtil) throws IOException { + var mappings = jsonUtil.readValue(new File(mappingsFile), Mapping[].class); + var mappingTreeBase = new MappingTreeBase(Arrays.stream(jsonUtil.readValue(new File(conceptTreeFile), MappingTreeModuleRoot[].class)).toList()); + + return Translator.of(MappingContext.of( + Stream.of(mappings) + .collect(Collectors.toMap(Mapping::key, Function.identity(), (a, b) -> a)), + mappingTreeBase, + Map.ofEntries(entry("http://fhir.de/CodeSystem/bfarm/icd-10-gm", "icd10"), + entry("mii.abide", "abide"), + entry("http://fhir.de/CodeSystem/bfarm/ops", "ops"), + entry("http://dicom.nema.org/resources/ontology/DCM", "dcm"), + entry("https://www.medizininformatik-initiative.de/fhir/core/modul-person/CodeSystem/Vitalstatus", "vitalstatus"), + entry("http://loinc.org", "loinc"), + entry("https://fhir.bbmri.de/CodeSystem/SampleMaterialType", "sample"), + entry("http://fhir.de/CodeSystem/bfarm/atc", "atc"), + entry("http://snomed.info/sct", "snomed"), + entry("http://terminology.hl7.org/CodeSystem/condition-ver-status", "cvs"), + entry("http://hl7.org/fhir/administrative-gender", "gender"), + entry("urn:oid:1.2.276.0.76.5.409", "urn409"), + entry( + "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "numecrf"), + entry("urn:iso:std:iso:3166", "iso3166"), + entry("https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty-score", + "frailtyscore"), + entry("http://terminology.hl7.org/CodeSystem/consentcategorycodes", "consentcategory"), + entry("urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", "consent"), + entry("http://hl7.org/fhir/sid/icd-o-3", "icdo3"), + entry("http://hl7.org/fhir/consent-provision-type", "provisiontype")))); + } + + + @Bean + FhirConnector createFhirConnector(@Value("${torch.fhir.url}") String fhirUrl) { + return new FhirConnector(fhirContext().newRestfulGenericClient(fhirUrl)); + } + + @Bean + FhirHelper createFhirHelper(FhirContext fhirContext) { + return new FhirHelper(fhirContext); + } + + @Bean + CqlClient createCqlQueryClient( + FhirHelper fhirHelper, + DataStore dataStore) { + + return new CqlClient( fhirHelper, dataStore); } @Bean @@ -79,8 +206,13 @@ public Redaction redaction(CdsStructureDefinitionHandler cds) { } @Bean - public ResourceTransformer resourceTransformer(DataStore dataStore, CdsStructureDefinitionHandler cds) { - return new ResourceTransformer(dataStore, cds); + public ResourceTransformer resourceTransformer(DataStore dataStore, CdsStructureDefinitionHandler cds, ConsentHandler handler) { + return new ResourceTransformer(dataStore, cds, handler); + } + + @Bean + ConsentHandler handler(DataStore dataStore, CdsStructureDefinitionHandler cds, ConsentCodeMapper mapper, @Value("${torch.mapping.consent_to_profile}") String consentFilePath) throws IOException { + return new ConsentHandler(dataStore, mapper,consentFilePath,cds); } @Bean @@ -90,7 +222,7 @@ public FhirContext fhirContext() { @Bean public CdsStructureDefinitionHandler cdsStructureDefinitionHandler(FhirContext fhirContext, @Value("${torch.profile.dir}") String dir) { - return new CdsStructureDefinitionHandler(fhirContext, dir); + return new CdsStructureDefinitionHandler(dir); } @Bean @@ -108,13 +240,44 @@ public BundleCreator bundleCreator() { return new BundleCreator(); } - @Bean - public ObjectMapper objectMapper() { - return new ObjectMapper(); - } @Bean ExecutorService executorService() { return Executors.newCachedThreadPool(); } + + @Bean + public Clock systemDefaultZone() { + return Clock.systemDefaultZone(); + } + + @Bean + @Qualifier("oauth") + ExchangeFilterFunction oauthExchangeFilterFunction( + @Value("${torch.fhir.oauth.issuer.uri:}") String issuerUri, + @Value("${torch.fhir.oauth.client.id:}") String clientId, + @Value("${torch.fhir.oauth.client.secret:}") String clientSecret) { + if (!issuerUri.isEmpty() && !clientId.isEmpty() && !clientSecret.isEmpty()) { + logger.debug("Enabling OAuth2 authentication (issuer uri: '{}', client id: '{}').", + issuerUri, clientId); + var clientRegistration = ClientRegistrations.fromIssuerLocation(issuerUri) + .registrationId(REGISTRATION_ID) + .clientId(clientId) + .clientSecret(clientSecret) + .authorizationGrantType(CLIENT_CREDENTIALS) + .build(); + var registrations = new InMemoryReactiveClientRegistrationRepository(clientRegistration); + var clientService = new InMemoryReactiveOAuth2AuthorizedClientService(registrations); + var authorizedClientManager = new AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager( + registrations, clientService); + var oAuthExchangeFilterFunction = new ServerOAuth2AuthorizedClientExchangeFilterFunction( + authorizedClientManager); + oAuthExchangeFilterFunction.setDefaultClientRegistrationId(REGISTRATION_ID); + + return oAuthExchangeFilterFunction; + } else { + logger.debug("Skipping OAuth2 authentication."); + return (request, next) -> next.exchange(request); + } + } } diff --git a/src/main/java/de/medizininformatikinitiative/torch/config/SpringContext.java b/src/main/java/de/medizininformatikinitiative/torch/config/SpringContext.java new file mode 100644 index 0000000..214de8c --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/config/SpringContext.java @@ -0,0 +1,25 @@ +package de.medizininformatikinitiative.torch.config; + +import de.medizininformatikinitiative.torch.model.mapping.DseMappingTreeBase; +import org.jetbrains.annotations.NotNull; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + +/** + * A context to retrieve {@link DseMappingTreeBase} bean from a non-Spring-managed instance. + */ +@Component +public class SpringContext implements ApplicationContextAware { + + private static ApplicationContext context; + + @Override + public void setApplicationContext(@NotNull ApplicationContext applicationContext) { + context = applicationContext; + } + + public static DseMappingTreeBase getDseMappingTreeBase() { + return context.getBean(DseMappingTreeBase.class); + } +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/cql/CqlClient.java b/src/main/java/de/medizininformatikinitiative/torch/cql/CqlClient.java new file mode 100644 index 0000000..7798523 --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/cql/CqlClient.java @@ -0,0 +1,88 @@ +package de.medizininformatikinitiative.torch.cql; + +import de.medizininformatikinitiative.torch.model.fhir.Query; +import de.medizininformatikinitiative.torch.model.fhir.QueryParams; +import de.medizininformatikinitiative.torch.rest.FhirController; +import de.medizininformatikinitiative.torch.service.DataStore; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.MeasureReport; +import org.hl7.fhir.r4.model.Parameters; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +import static de.medizininformatikinitiative.torch.model.fhir.QueryParams.stringValue; + + +public class CqlClient { + private static final Logger logger = LoggerFactory.getLogger(CqlClient.class); + private final FhirHelper fhirHelper; + + private final DataStore dataStore; + + public CqlClient( + FhirHelper fhirHelper, DataStore dataStore) { + this.fhirHelper = fhirHelper; + this.dataStore = dataStore; + + } + + + public Mono> getPatientListByCql(String cqlQuery) { + var libraryUri = "urn:uuid:" + UUID.randomUUID(); + var measureUri = "urn:uuid:" + UUID.randomUUID(); + Parameters params; + logger.debug(" Library {} \n Measure {}", libraryUri, measureUri); + + try { + params = fhirHelper.getListExecutionParams(); + } catch (IOException e) { + throw new RuntimeException("Failed to retrieve list execution parameters", e); + } + + params.setParameter("measure", measureUri); + Parameters finalParams = params; + + return Mono.fromCallable(() -> fhirHelper.createBundle(cqlQuery, libraryUri, measureUri)) + .doOnError(e -> logger.error("Error creating FHIR bundle with CQL query: {}. Library URI: {}, Measure URI: {}. Error: {}", + cqlQuery, libraryUri, measureUri, e.getMessage(), e)) + .flatMap(bundle -> dataStore.transmitBundle(bundle) // transmitBundle returns Mono + .doOnSuccess(aVoid -> { + logger.info("Successfully transmitted FHIR bundle."); + }) + .doOnError(e -> logger.error("Error transmitting FHIR bundle to the server. Bundle: {}. Error: {}", + bundle, e.getMessage(), e)) + .then(Mono.defer(() -> { + logger.info("Proceeding to measure evaluation."); + return dataStore.evaluateMeasure(finalParams) + .doOnError(e -> logger.error("Error evaluating measure for measureUri: {}. Parameters: {}. Error: {}", + measureUri, finalParams, e.getMessage(), e)); + })) + ) + .flatMap(measureReport -> { + var subjectListId = measureReport.getGroupFirstRep() + .getPopulationFirstRep() + .getSubjectResults() + .getReferenceElement() + .getIdPart(); + + QueryParams queryParams = QueryParams.of("_list", stringValue(subjectListId)); + Query fhirQuery = new Query("Patient", queryParams); + + return dataStore.executeCollectPatientIds(fhirQuery) + .doOnError(e -> logger.error("Error executing FHIR query for patient list. Query: {}. Error: {}", + fhirQuery, e.getMessage(), e)); + }) + .doOnError(error -> { + logger.error("An unexpected error occurred during the patient list retrieval process. CQL query: {}, Library URI: {}, Measure URI: {}. Error: {}", + cqlQuery, libraryUri, measureUri, error.getMessage(), error); + }); + } + + +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/cql/FhirConnector.java b/src/main/java/de/medizininformatikinitiative/torch/cql/FhirConnector.java new file mode 100644 index 0000000..0ed2ce9 --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/cql/FhirConnector.java @@ -0,0 +1,87 @@ +package de.medizininformatikinitiative.torch.cql; + +import ca.uhn.fhir.rest.client.api.IGenericClient; +import ca.uhn.fhir.rest.client.exceptions.FhirClientConnectionException; +import ca.uhn.fhir.rest.gclient.StringClientParam; +import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Measure; +import org.hl7.fhir.r4.model.MeasureReport; +import org.hl7.fhir.r4.model.Parameters; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.io.IOException; +import java.util.List; + + +@Component +public class FhirConnector { + + private static final Logger logger = LoggerFactory.getLogger(FhirConnector.class); + private final IGenericClient client; + + public FhirConnector(IGenericClient client) { + this.client = client; + } + + /** + * Submit a {@link Bundle} to the FHIR server. + * + * @param bundle the {@link Bundle} to submit + * @throws IOException if the communication with the FHIR server fails due to any client or server error + */ + public void transmitBundle(Bundle bundle) throws IOException { + try { + //Post Bundle + client.transaction().withBundle(bundle).execute(); + } catch (BaseServerResponseException e) { + throw new IOException("An error occurred while trying to create measure and library", e); + } + } + + + + + private Mono fetchInitialBundle(String id) { + //get mit FHIR Search + return Mono.fromCallable(() -> client.search() + .forResource("Patient") + .where(new StringClientParam("_list").matches().value(id)) + .elementsSubset("id") + .returnBundle(Bundle.class) + .execute()) + .onErrorResume(e -> { + logger.debug("Failed to connect to the FHIR server: {}", e.getMessage()); + return Mono.empty(); + }); + } + + + + /** + * Get the {@link MeasureReport} for a previously transmitted {@link Measure} + * + * @param params the Parameters for the evaluation of the {@link Measure} + * @return the retrieved {@link MeasureReport} from the server + * @throws IOException if the communication with the FHIR server fails due to any client or server error + */ + public MeasureReport evaluateMeasure(Parameters params) throws IOException { + try { + //Get + return client.operation().onType(Measure.class) + .named("evaluate-measure") + .withParameters(params) + .returnResourceType(MeasureReport.class) + .execute(); + } catch (BaseServerResponseException e) { + throw new IOException("An error occurred while trying to evaluate a measure report", e); + } + + + } + +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/cql/FhirHelper.java b/src/main/java/de/medizininformatikinitiative/torch/cql/FhirHelper.java new file mode 100644 index 0000000..c2e9ef2 --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/cql/FhirHelper.java @@ -0,0 +1,122 @@ +package de.medizininformatikinitiative.torch.cql; + +import ca.uhn.fhir.context.FhirContext; +import de.medizininformatikinitiative.torch.service.DataStore; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Library; +import org.hl7.fhir.r4.model.Measure; +import org.hl7.fhir.r4.model.Parameters; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.io.IOException; +import java.io.InputStream; + +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION; +import static org.hl7.fhir.r4.model.Bundle.HTTPVerb.POST; + +@Component +public class FhirHelper { + private static final Logger logger = LoggerFactory.getLogger(FhirHelper.class); + + private static final String CQL_REPRESENTATION = "text/cql"; + private final FhirContext context; + + public FhirHelper(FhirContext context) { + this.context = context; + } + + /** + * Add the CQL query to a {@link Library} + * + * @param library the {@link Library} to add the CQL string to + * @param cql the CQL string to add + * @return the {@link Library} with the added CQL + */ + private static Library appendCql(Library library, String cql) { + library.getContentFirstRep().setContentType(CQL_REPRESENTATION); + library.getContentFirstRep().setData(cql.getBytes(UTF_8)); + return library; + } + + /** + * Create a {@link Bundle} of a {@link Library} and a {@link Measure} + * + * @param library the {@link Library} to add to the {@link Bundle} + * @param measure the {@link Measure} to add to the {@link Bundle} + * @return the {@link Bundle}, consisting of the given {@link Library} and {@link Measure} + */ + private static Bundle bundleLibraryAndMeasure(Library library, Measure measure) { + var bundle = new Bundle(); + bundle.setType(TRANSACTION); + bundle.addEntry().setResource(library).getRequest().setMethod(POST).setUrl("Library"); + bundle.addEntry().setResource(measure).getRequest().setMethod(POST).setUrl("Measure"); + return bundle; + } + + /** + * Read file contents as String + * + * @param fileName name of the resource file + * @return the String contents of the file + */ + public static String getResourceFileAsString(String fileName) throws IOException { + InputStream is = getResourceFileAsInputStream(fileName); + if (is != null) { + return new String(is.readAllBytes(), UTF_8); + } else { + throw new RuntimeException("File not found in classpath: " + fileName); + } + } + + /** + * Read file contents as {@link InputStream} + * + * @param fileName name of the resource file + * @return an {@link InputStream} of the file + */ + private static InputStream getResourceFileAsInputStream(String fileName) { + return CqlClient.class.getResourceAsStream(fileName); + } + + /** + * Create a {@link Bundle} with predefined library and measure URI, as well as CQL String + * + * @param cql the plaintext cql definition + * @param libraryUri a library uri {@link String} to be included in the {@link Bundle} + * @param measureUri a measure uri {@link String} to be included in the {@link Bundle} + * @return the {@link Bundle}, consisting of a {@link Library} and {@link Measure}, containing the submitted values + */ + public Bundle createBundle(String cql, String libraryUri, String measureUri) throws IOException { + var library = appendCql(parseResource(Library.class, + getResourceFileAsString("Library.json")).setUrl(libraryUri), cql); + var measure = parseResource(Measure.class, + getResourceFileAsString("Measure.json")) + .setUrl(measureUri) + .addLibrary(libraryUri); + logger.debug("Measure {}",measure); + return bundleLibraryAndMeasure(library, measure); + } + + public Parameters getListExecutionParams() throws IOException { + + return parseResource(org.hl7.fhir.r4.model.Parameters.class, getResourceFileAsString("PatientListParams.json")); + + } + + /** + * Parse a String as an {@link IBaseResource} implementation + * + * @param type the concrete {@link IBaseResource} implementation class to parse to + * @param input the {@link String} to parse + * @param any implementation of {@link IBaseResource} + * @return the wanted {@link IBaseResource} implementation object + */ + private T parseResource(Class type, String input) { + var parser = context.newJsonParser(); + return type.cast(parser.parseResource(input)); + } +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/exceptions/ConsentViolatedException.java b/src/main/java/de/medizininformatikinitiative/torch/exceptions/ConsentViolatedException.java new file mode 100644 index 0000000..18eb908 --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/exceptions/ConsentViolatedException.java @@ -0,0 +1,9 @@ +package de.medizininformatikinitiative.torch.exceptions; + +public class ConsentViolatedException extends Exception{ + + public ConsentViolatedException(String errorMessage) { + super(errorMessage); + } + +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/model/AttributeGroup.java b/src/main/java/de/medizininformatikinitiative/torch/model/AttributeGroup.java index 79fb934..c57e487 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/model/AttributeGroup.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/AttributeGroup.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import de.medizininformatikinitiative.torch.config.SpringContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/de/medizininformatikinitiative/torch/model/Code.java b/src/main/java/de/medizininformatikinitiative/torch/model/Code.java index 7e2be29..ec9fe35 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/model/Code.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/Code.java @@ -12,6 +12,12 @@ public class Code { // No-argument constructor public Code() { } + + public Code(String system, String code) { + this.system = system; + this.code = code; + } + @JsonProperty("code") private String code; @@ -22,7 +28,6 @@ public Code() { private String display; - public String getCodeURL(){ String encodedString = ""; try { @@ -35,4 +40,11 @@ public String getCodeURL(){ } // Getters and Setters + public String getCode() { + return code; + } + + public String getSystem() { + return system; + } } diff --git a/src/main/java/de/medizininformatikinitiative/torch/model/Crtdl.java b/src/main/java/de/medizininformatikinitiative/torch/model/Crtdl.java index 34104b3..5424e52 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/model/Crtdl.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/Crtdl.java @@ -4,11 +4,15 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.JsonNode; -import de.medizininformatikinitiative.flare.model.sq.StructuredQuery; +import de.medizininformatikinitiative.torch.ResourceTransformer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @JsonIgnoreProperties(ignoreUnknown = true) public class Crtdl { + private static final Logger logger = LoggerFactory.getLogger(Crtdl.class); + // No-argument constructor public Crtdl() { } @@ -56,4 +60,36 @@ public String getResourceType() { public JsonNode getCohortDefinition() { return cohortDefinition; } + + // Helper method to extract the consent key from the cohortDefinition JSON node + public String getConsentKey() { + if (cohortDefinition == null) { + logger.error("cohortDefinition is null"); + return null; + } + + // Traverse through the cohortDefinition, looking for "Einwilligung" context and extract the termcode + JsonNode inclusionCriteria = cohortDefinition.get("inclusionCriteria"); + if (inclusionCriteria != null && inclusionCriteria.isArray()) { + for (JsonNode criteriaGroup : inclusionCriteria) { + for (JsonNode criteria : criteriaGroup) { + JsonNode context = criteria.get("context"); + if (context != null && "Einwilligung".equals(context.get("code").asText())) { + JsonNode termcodes = criteria.get("termCodes"); + if (termcodes != null && termcodes.isArray()) { + // Assuming only one termcode per "Einwilligung" context + JsonNode firstTermcode = termcodes.get(0); + if (firstTermcode != null && firstTermcode.has("code")) { + return firstTermcode.get("code").asText(); + } + } + } + } + } + } + + logger.error("No valid consent key found in cohortDefinition."); + return ""; + } + } diff --git a/src/main/java/de/medizininformatikinitiative/torch/model/Filter.java b/src/main/java/de/medizininformatikinitiative/torch/model/Filter.java index d3a21a5..95c7016 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/model/Filter.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/Filter.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import de.medizininformatikinitiative.torch.config.SpringContext; import java.util.*; @@ -12,6 +13,13 @@ public class Filter { public Filter() { } + // Constructor for direct instantiation (for testing) + public Filter(String type, String name, List codes) { + this.type = type; + this.name = name; + this.codes = codes; + } + @JsonProperty("type") private String type; @@ -57,10 +65,12 @@ String getCodeFilter() { result+=name+"="; List codeUrls = new ArrayList<>(); for (Code code : codes) { - codeUrls.add(code.getCodeURL()); + String s = code.getSystem(); + var expandedCodes = SpringContext.getDseMappingTreeBase().expand(s, code.getCode()).map(c -> new Code(s, c)); + + codeUrls.addAll(expandedCodes.map(Code::getCodeURL).toList()); } result += String.join(",", codeUrls); - } return result; } diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Bundle.java b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Bundle.java similarity index 89% rename from src/main/java/de/medizininformatikinitiative/flare/model/fhir/Bundle.java rename to src/main/java/de/medizininformatikinitiative/torch/model/fhir/Bundle.java index 8c3127a..f4d869e 100644 --- a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Bundle.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Bundle.java @@ -1,4 +1,4 @@ -package de.medizininformatikinitiative.flare.model.fhir; +package de.medizininformatikinitiative.torch.model.fhir; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Entry.java b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Entry.java similarity index 72% rename from src/main/java/de/medizininformatikinitiative/flare/model/fhir/Entry.java rename to src/main/java/de/medizininformatikinitiative/torch/model/fhir/Entry.java index 2e69661..6cbab92 100644 --- a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Entry.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Entry.java @@ -1,4 +1,4 @@ -package de.medizininformatikinitiative.flare.model.fhir; +package de.medizininformatikinitiative.torch.model.fhir; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Link.java b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Link.java similarity index 83% rename from src/main/java/de/medizininformatikinitiative/flare/model/fhir/Link.java rename to src/main/java/de/medizininformatikinitiative/torch/model/fhir/Link.java index a91f58a..194842b 100644 --- a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Link.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Link.java @@ -1,4 +1,4 @@ -package de.medizininformatikinitiative.flare.model.fhir; +package de.medizininformatikinitiative.torch.model.fhir; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Query.java b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Query.java similarity index 90% rename from src/main/java/de/medizininformatikinitiative/flare/model/fhir/Query.java rename to src/main/java/de/medizininformatikinitiative/torch/model/fhir/Query.java index 9b08a69..fdd246e 100644 --- a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Query.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Query.java @@ -1,4 +1,4 @@ -package de.medizininformatikinitiative.flare.model.fhir; +package de.medizininformatikinitiative.torch.model.fhir; import static java.util.Objects.requireNonNull; diff --git a/src/main/java/de/medizininformatikinitiative/torch/model/fhir/QueryParams.java b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/QueryParams.java new file mode 100644 index 0000000..c90f823 --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/QueryParams.java @@ -0,0 +1,99 @@ +package de.medizininformatikinitiative.torch.model.fhir; + +import java.time.LocalDate; +import java.util.LinkedList; +import java.util.List; +import java.util.stream.Collectors; + +import static java.util.Objects.requireNonNull; + +/** + * An immutable list of query params. + *

+ * In order to build a list of query params, start either with {@link #EMPTY} or the {@link #of(String, Value) creator + * method} and continue with the {@link #appendParam(String, Value) appendParam} method. + */ +public record QueryParams(List params) { + + public static QueryParams EMPTY = new QueryParams(List.of()); + + public QueryParams { + params = List.copyOf(params); + } + + public static QueryParams of(String name, Value value) { + return EMPTY.appendParam(requireNonNull(name), requireNonNull(value)); + } + + public static Value stringValue(String value) { + return new StringValue(requireNonNull(value)); + } + + + /** + * Appends a param with {@code name} and {@code value}. + * + * @param name the name of the query parameter + * @param value the value of the query parameter + * @return the {@code QueryParams} resulting in appending the param + */ + public QueryParams appendParam(String name, Value value) { + var sb = new LinkedList<>(this.params); + sb.add(new Param(requireNonNull(name), requireNonNull(value))); + return new QueryParams(sb); + } + + /** + * Appends a params by calling the function {@code appendTo}. + * + * @param params a function that takes a {@code QueryParams}, appends some params returning the resulting {@code QueryParams} + * @return the {@code QueryParams} resulting in appending the params + */ + public QueryParams appendParams(QueryParams params) { + var sb = new LinkedList<>(this.params); + sb.addAll(params.params); + return new QueryParams(sb); + } + + /** + * Prefixes the name of each {@code Param query param} with {@code name} followed by an {@literal .}. + * + * @param name the name to use a prefix + * @return the {@code QueryParams} resulting in prefixing + */ + public QueryParams prefixName(String name) { + return new QueryParams(params.stream().map(param -> new Param(name + "." + param.name, param.value)).toList()); + } + + @Override + public String toString() { + return params.stream().map(Param::toString).collect(Collectors.joining("&")); + } + + private record Param(String name, Value value) { + + @Override + public String toString() { + return name + "=" + value; + } + } + + /** + * A value of a query param. + */ + interface Value { + } + + private record StringValue(String value) implements Value { + + private StringValue { + requireNonNull(value); + } + + @Override + public String toString() { + return value; + } + } + +} diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Reference.java b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Reference.java similarity index 85% rename from src/main/java/de/medizininformatikinitiative/flare/model/fhir/Reference.java rename to src/main/java/de/medizininformatikinitiative/torch/model/fhir/Reference.java index 6f7638c..7428216 100644 --- a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Reference.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Reference.java @@ -1,4 +1,4 @@ -package de.medizininformatikinitiative.flare.model.fhir; +package de.medizininformatikinitiative.torch.model.fhir; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Resource.java b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Resource.java similarity index 86% rename from src/main/java/de/medizininformatikinitiative/flare/model/fhir/Resource.java rename to src/main/java/de/medizininformatikinitiative/torch/model/fhir/Resource.java index 9cce884..83665a4 100644 --- a/src/main/java/de/medizininformatikinitiative/flare/model/fhir/Resource.java +++ b/src/main/java/de/medizininformatikinitiative/torch/model/fhir/Resource.java @@ -1,4 +1,4 @@ -package de.medizininformatikinitiative.flare.model.fhir; +package de.medizininformatikinitiative.torch.model.fhir; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/src/main/java/de/medizininformatikinitiative/torch/model/mapping/DseMappingTreeBase.java b/src/main/java/de/medizininformatikinitiative/torch/model/mapping/DseMappingTreeBase.java new file mode 100644 index 0000000..75532af --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/model/mapping/DseMappingTreeBase.java @@ -0,0 +1,13 @@ +package de.medizininformatikinitiative.torch.model.mapping; + + +import java.util.List; +import java.util.stream.Stream; + +public record DseMappingTreeBase(List moduleRoots) { + public Stream expand(String system, String code) { + + return moduleRoots.stream().flatMap(moduleRoot -> + moduleRoot.isModuleMatching(system, code) ? moduleRoot.expand(code) : Stream.empty()); + } +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/model/mapping/DseTreeEntry.java b/src/main/java/de/medizininformatikinitiative/torch/model/mapping/DseTreeEntry.java new file mode 100644 index 0000000..9e8c055 --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/model/mapping/DseTreeEntry.java @@ -0,0 +1,17 @@ +package de.medizininformatikinitiative.torch.model.mapping; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + +@JsonIgnoreProperties(ignoreUnknown = true) +public record DseTreeEntry(String key, List children) { + + @JsonCreator + static DseTreeEntry fromJson(@JsonProperty("key") String key, + @JsonProperty("children") List children) { + return new DseTreeEntry(key, children); + } +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/model/mapping/DseTreeRoot.java b/src/main/java/de/medizininformatikinitiative/torch/model/mapping/DseTreeRoot.java new file mode 100644 index 0000000..f8189b0 --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/model/mapping/DseTreeRoot.java @@ -0,0 +1,31 @@ +package de.medizininformatikinitiative.torch.model.mapping; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static java.util.function.Function.identity; + +public record DseTreeRoot(String system, Map entries) { + + @JsonCreator + static DseTreeRoot fromJson(@JsonProperty("system") String system, + @JsonProperty("entries") List entries) { + return new DseTreeRoot( + system, + entries.stream().collect(Collectors.toMap(DseTreeEntry::key, identity()))); + } + + public Stream expand(String key) { + return Stream.concat(Stream.of(key), entries.get(key).children().stream().flatMap(this::expand)); + } + + boolean isModuleMatching(String system, String code) { + return this.system.equals(system) && + this.entries.containsKey(code); + } +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/rest/FhirController.java b/src/main/java/de/medizininformatikinitiative/torch/rest/FhirController.java index ec8ca70..cd3a0ef 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/rest/FhirController.java +++ b/src/main/java/de/medizininformatikinitiative/torch/rest/FhirController.java @@ -6,12 +6,14 @@ import com.fasterxml.jackson.databind.ObjectMapper; import de.medizininformatikinitiative.torch.BundleCreator; import de.medizininformatikinitiative.torch.ResourceTransformer; +import de.medizininformatikinitiative.torch.cql.CqlClient; import de.medizininformatikinitiative.torch.model.Crtdl; import de.medizininformatikinitiative.torch.util.ResultFileManager; +import de.numcodex.sq2cql.Translator; +import de.numcodex.sq2cql.model.structured_query.StructuredQuery; import org.hl7.fhir.r4.model.Base64BinaryType; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Parameters; -import org.hl7.fhir.r4.model.Property; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -47,7 +49,6 @@ public class FhirController { private static final MediaType MEDIA_TYPE_FHIR_JSON = MediaType.valueOf("application/fhir+json"); private static final Logger logger = LoggerFactory.getLogger(FhirController.class); - private final WebClient webClient; private final ResourceTransformer transformer; private final BundleCreator bundleCreator; @@ -57,29 +58,39 @@ public class FhirController { private final ExecutorService executorService; private final int batchSize; private final int maxConcurrency; + private final CqlClient cqlClient; + private final Translator cqlQueryTranslator; + private final boolean useCql; + @Autowired public FhirController( @Qualifier("flareClient") WebClient webClient, + Translator cqlQueryTranslator, + CqlClient cqlClient, ResultFileManager resultFileManager, ResourceTransformer transformer, BundleCreator bundleCreator, - ObjectMapper objectMapper, FhirContext fhirContext, ExecutorService executorService, @Value("${torch.batchsize:10}") int batchsize, - @Value("${torch.maxConcurrency:5}") int maxConcurrency) { + @Value("${torch.maxConcurrency:5}") int maxConcurrency, + @Value("${torch.useCql}") boolean useCql) { this.webClient = webClient; this.transformer = transformer; this.bundleCreator = bundleCreator; - this.objectMapper = objectMapper; + this.objectMapper = new ObjectMapper(); this.fhirContext = fhirContext; this.resultFileManager = resultFileManager; this.executorService = executorService; this.batchSize = batchsize; this.maxConcurrency = maxConcurrency; + this.cqlClient = cqlClient; + this.useCql = useCql; + this.cqlQueryTranslator = cqlQueryTranslator; } + private static byte[] decodeCrtdlContent(Parameters parameters) { for (var parameter : parameters.getParameter()) { if ("crtdl".equals(parameter.getName())) { @@ -166,7 +177,7 @@ private Crtdl parseCrtdlContent(byte[] content) throws IOException { } private Mono processCrtdl(Crtdl crtdl, String jobId) { - return fetchPatientListFromFlare(crtdl) + return fetchPatientList(crtdl) .flatMapMany(patientList -> { if (patientList.isEmpty()) { resultFileManager.setStatus(jobId, "Failed at collectResources for batch: "); @@ -209,8 +220,16 @@ private Mono processCrtdl(Crtdl crtdl, String jobId) { .then(); // This returns Mono indicating completion } + public Mono> fetchPatientList(Crtdl crtdl) { + + try { + return (useCql) ? fetchPatientListUsingCql(crtdl) : fetchPatientListFromFlare(crtdl); + } catch (JsonProcessingException e) { + return Mono.error(e); + } + } + public Mono> fetchPatientListFromFlare(Crtdl crtdl) { - //logger.debug("Flare called for the following input {}",crtdl.getSqString()); return webClient.post() .uri("/query/execute-cohort") .contentType(MediaType.parseMediaType("application/sq+json")) @@ -238,6 +257,11 @@ public Mono> fetchPatientListFromFlare(Crtdl crtdl) { .doOnError(e -> logger.error("Error fetching patient list from Flare: {}", e.getMessage())); } + public Mono> fetchPatientListUsingCql(Crtdl crtdl) throws JsonProcessingException { + StructuredQuery ccdl = objectMapper.treeToValue(crtdl.getCohortDefinition(), StructuredQuery.class); + return this.cqlClient.getPatientListByCql(cqlQueryTranslator.toCql(ccdl).print()); + } + public Mono checkStatus(ServerRequest request) { var jobId = request.pathVariable("jobId"); diff --git a/src/main/java/de/medizininformatikinitiative/torch/service/DataStore.java b/src/main/java/de/medizininformatikinitiative/torch/service/DataStore.java new file mode 100644 index 0000000..0c3f845 --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/service/DataStore.java @@ -0,0 +1,178 @@ +package de.medizininformatikinitiative.torch.service; + +import ca.uhn.fhir.context.FhirContext; +import de.medizininformatikinitiative.torch.model.fhir.Query; +import de.medizininformatikinitiative.torch.model.fhir.QueryParams; +import de.medizininformatikinitiative.torch.util.TimeUtils; +import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.MeasureReport; +import org.hl7.fhir.r4.model.Parameters; +import org.hl7.fhir.r4.model.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatusCode; +import org.springframework.stereotype.Component; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.net.URI; +import java.time.Clock; +import java.time.Duration; +import java.util.List; +import java.util.Optional; + +import static de.medizininformatikinitiative.torch.model.fhir.QueryParams.stringValue; +import static org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED; + +@Component +public class DataStore { + private static final Logger logger = LoggerFactory.getLogger(DataStore.class); + + private final WebClient client; + private final FhirContext fhirContext; + private final Clock clock; + private final int pageCount; + + + @Autowired + public DataStore(@Qualifier("fhirClient") WebClient client, FhirContext fhirContext, @Qualifier("systemDefaultZone") Clock clock, + @Value("${torch.fhir.pageCount}") int pageCount) { + this.client = client; + this.fhirContext = fhirContext; + this.clock = clock; + this.pageCount = pageCount; + } + + /** + * Executes {@code FHIRSearchQuery} and returns all resources found with that query. + * + * @param parameters the fhir search query parameters defining the patient resources to be fetched + * @return the resources found with the {@param FHIRSearchQuery} + */ + public Flux getResources(String resourceType,String parameters) { + //logger.debug("Search Parameters{}", parameters); + + return client.post() + .uri("/"+resourceType+"/_search") + .bodyValue(parameters) + .header("Content-Type", "application/x-www-form-urlencoded") + .retrieve() + .bodyToMono(String.class) + .doOnNext(response -> logger.debug("getResources Response: {}", response)) + .flatMap(response -> Mono.just(fhirContext.newJsonParser().parseResource(Bundle.class, response))) + .expand(bundle -> Optional.ofNullable(bundle.getLink("next")) + .map(link -> fetchPage(client, link.getUrl())) + .orElse(Mono.empty())) + .flatMap(bundle -> Flux.fromStream(bundle.getEntry().stream().map(Bundle.BundleEntryComponent::getResource))); + } + + private Mono fetchPage(WebClient client, String url) { + //logger.debug("Fetch Page {}", url); + return client.get() + .uri(URI.create(url)) + .retrieve() + .bodyToMono(String.class) + .map(response -> fhirContext.newJsonParser().parseResource(Bundle.class, response)); + } + + private Mono fetchPageCompressed(String url) { + logger.trace("fetch page {}", url); + return client.get() + .uri(url) + .retrieve() + .bodyToMono(de.medizininformatikinitiative.torch.model.fhir.Bundle.class); + } + + public Mono> executeCollectPatientIds(Query query) { + var startNanoTime = System.nanoTime(); + logger.debug("Execute query: {}", query); + return client.post() + .uri("/{type}/_search", query.type()) + .contentType(APPLICATION_FORM_URLENCODED) + .bodyValue(query.params().appendParams(extraQueryParams(query.type())).toString()) + .retrieve() + .bodyToFlux(de.medizininformatikinitiative.torch.model.fhir.Bundle.class) + .expand(bundle -> bundle.linkWithRel("next") + .map(link -> fetchPageCompressed(link.url())) + .orElse(Mono.empty())) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(1)) + .filter(e -> e instanceof WebClientResponseException && + shouldRetry(((WebClientResponseException) e).getStatusCode()))) + .flatMap(bundle -> Flux.fromStream(bundle.entry().stream().flatMap(e -> e.resource().patientId().stream()))) + .collectList() + .doOnNext(p -> logger.debug("Finished query `{}` returning {} patients in {} seconds.", query, p.size(), + "%.1f".formatted(TimeUtils.durationSecondsSince(startNanoTime)))) + .doOnError(e -> logger.error("Error while executing query `{}`: {}", query, e.getMessage())); + } + + private QueryParams extraQueryParams(String type) { + return QueryParams.of("_elements", stringValue(queryElements(type))) + .appendParam("_count", stringValue(Integer.toString(pageCount))); + } + + private static String queryElements(String type) { + return switch (type) { + case "Patient" -> "id"; + case "Immunization", "Consent" -> "patient"; + default -> "subject"; + }; + } + + private static boolean shouldRetry(HttpStatusCode code) { + return code.is5xxServerError() || code.value() == 404; + } + + public Mono transmitBundle(Bundle bundle) { + + return client.post() + .uri("") + .header("Content-Type", "application/fhir+json") + .bodyValue(fhirContext.newJsonParser().encodeResourceToString(bundle)) + .retrieve() + .bodyToMono(String.class) + .doOnNext(response -> { + try { + logger.trace("Received response: {}", response); + } catch (Exception e) { + throw new RuntimeException("Error processing the response", e); + } + }) + .doOnSuccess(response -> logger.debug("Successfully transmitted Bundle")) + .doOnError(error -> logger.error("Error occurred while transmitting Bundle: {}", error.getMessage())) + .then(); + } + + + + + + + /** + * Get the {@link MeasureReport} for a previously transmitted {@link Measure} + * + * @param params the Parameters for the evaluation of the {@link Measure} + * @return the retrieved {@link MeasureReport} from the server + */ + public Mono evaluateMeasure(Parameters params) { + logger.debug("Evaluating Measure with provided parameters."); + logger.debug(params.toString()); + return client.post() + .uri("/Measure/$evaluate-measure") + .header("Content-Type", "application/fhir+json") + .bodyValue(fhirContext.newJsonParser().encodeResourceToString(params)) + .retrieve() + .bodyToMono(String.class) + .flatMap(response -> { + logger.debug("Parsing response into MeasureReport."); + return Mono.just(fhirContext.newJsonParser().parseResource(MeasureReport.class, response)); + }) + .doOnSuccess(measureReport -> logger.debug("Successfully evaluated Measure and received MeasureReport.")) + .doOnError(error -> logger.error("Error occurred while evaluating Measure: {}", error.getMessage())); + } +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/BatchUtils.java b/src/main/java/de/medizininformatikinitiative/torch/util/BatchUtils.java index 60fabb3..8b5301d 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/util/BatchUtils.java +++ b/src/main/java/de/medizininformatikinitiative/torch/util/BatchUtils.java @@ -3,8 +3,18 @@ import java.util.ArrayList; import java.util.List; +/** + * Utility class for batch processing of lists. + */ public class BatchUtils { + /** + * Splits a list of strings into smaller batches of a specified size. + * + * @param originalList the original list to be split into batches + * @param batchSize the maximum size of each batch + * @return a list of lists, where each sublist is a batch of the original list + */ public static List> splitListIntoBatches(List originalList, int batchSize) { List> batches = new ArrayList<>(); int totalSize = originalList.size(); diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/ConsentCodeMapper.java b/src/main/java/de/medizininformatikinitiative/torch/util/ConsentCodeMapper.java new file mode 100644 index 0000000..11759dd --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/util/ConsentCodeMapper.java @@ -0,0 +1,52 @@ +package de.medizininformatikinitiative.torch.util; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import java.io.File; +import java.io.IOException; +import java.util.*; + +@Component +public class ConsentCodeMapper { + + private Map> consentMap; + + public ConsentCodeMapper( + String consentFilePath + ) throws IOException { + this.consentMap = new HashMap<>(); + buildConsentMap(consentFilePath); + } + + // Method to build the map based on the JSON file + private void buildConsentMap(String filePath) throws IOException { + File file = new File(filePath); + + ObjectMapper mapper = new ObjectMapper(); + JsonNode consentMappingData = mapper.readTree(file.getAbsoluteFile()); + for (JsonNode consent : consentMappingData) { + String keyCode = consent.get("key").get("code").asText(); + List relevantCodes = new ArrayList<>(); + + JsonNode fixedCriteria = consent.get("fixedCriteria"); + if (fixedCriteria != null) { + for (JsonNode criterion : fixedCriteria) { + Iterator values = criterion.get("value").elements(); + while (values.hasNext()) { + JsonNode value = values.next(); + relevantCodes.add(value.get("code").asText()); + } + } + } + + consentMap.put(keyCode, relevantCodes); + } + } + + public Set getRelevantCodes(String key) { + return new HashSet<>(consentMap.getOrDefault(key, Collections.emptyList())); + } +} \ No newline at end of file diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/ConsentProcessor.java b/src/main/java/de/medizininformatikinitiative/torch/util/ConsentProcessor.java new file mode 100644 index 0000000..abdc514 --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/util/ConsentProcessor.java @@ -0,0 +1,87 @@ +package de.medizininformatikinitiative.torch.util; + +import ca.uhn.fhir.context.FhirContext; +import de.medizininformatikinitiative.torch.exceptions.ConsentViolatedException; +import org.hl7.fhir.r4.model.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.*; + +@Component // This makes the class a Spring bean +public class ConsentProcessor { + + public static final Logger logger = LoggerFactory.getLogger(ConsentProcessor.class); + + private final FhirContext fhirContext; + + @Autowired // Autowiring the FhirContext + public ConsentProcessor(FhirContext fhirContext) { + this.fhirContext = fhirContext; + } + + public List extractConsentProvisions(DomainResource domainResource) { + try { + // Using the autowired FhirContext to extract Encounter.provision.provision elements from the resource + return fhirContext.newFhirPath().evaluate(domainResource, "Consent.provision.provision", Base.class); + } catch (Exception e) { + logger.error("Error extracting provisions with FHIRPath", e); + return Collections.emptyList(); // Return an empty list in case of errors + } + } + + public Map> transformToConsentPeriodByCode(DomainResource domainResource, Set validCodes) throws ConsentViolatedException { + // Map to hold lists of ConsentPeriod for each code + validCodes.forEach(code -> logger.debug("validCode {}", code)); + Map> consentPeriodMap = new HashMap<>(); + List provisionPeriodList = extractConsentProvisions(domainResource); + + // Iterate over the provisions to find periods for each valid code + for (Base provisionBase : provisionPeriodList) { + try { + // Assuming provision has a period with start and end dates + Consent.provisionComponent provision = (Consent.provisionComponent) provisionBase; + Period period = provision.getPeriod(); + String code = provision.getCode().getFirst().getCoding().getFirst().getCode(); + + logger.debug("Period found {} {} Code {}", period.getStart(), period.getEnd(), code); + + // Check if the code is in the list of valid codes + if (!validCodes.contains(code)) { + continue; // Skip if code is not valid + } + + logger.debug("Found valid code {}", code); + + // Extract start and end dates from the provision's period + DateTimeType start = period.hasStart() ? period.getStartElement() : null; + DateTimeType end = period.hasEnd() ? period.getEndElement() : null; + + // If no start or end period is present, skip to the next provision + if (start == null || end == null) continue; + + + + + // Add the new consent period to the map under the corresponding code + consentPeriodMap.computeIfAbsent(code, k -> new ArrayList<>()).add(period); + + } catch (Exception e) { + logger.error("Error processing provision period", e); + } + } + + // Handle the case where no valid periods were found for any code + if (consentPeriodMap.isEmpty()) { + throw new ConsentViolatedException("No valid start or end dates found for the provided valid codes"); + } + + if (!consentPeriodMap.keySet().equals(validCodes)) { + throw new ConsentViolatedException("Resource does not have valid consents for every requested code"); + } + + return consentPeriodMap; + } +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/DiscriminatorResolver.java b/src/main/java/de/medizininformatikinitiative/torch/util/DiscriminatorResolver.java index 1c952fa..01f9e39 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/util/DiscriminatorResolver.java +++ b/src/main/java/de/medizininformatikinitiative/torch/util/DiscriminatorResolver.java @@ -99,15 +99,15 @@ private static boolean compareBaseToFixedOrPattern(Base resolvedBase, Base fixed // You may need to recursively compare the elements that are defined in fixedOrPatternValue // Example: if fixedOrPatternValue is a complex type, iterate over its children if (!Objects.equals(resolvedBase.fhirType(), fixedOrPatternValue.fhirType())) { - logger.warn("Incompatible Data types when comparing "); + logger.warn("Incompatible Data types when comparing {} {}",resolvedBase.fhirType(), fixedOrPatternValue.fhirType()); return false; } if (fixedOrPatternValue.isPrimitive()) { - logger.debug("Handling Primitive Types {}", fixedOrPatternValue.getIdBase()); + logger.trace("Handling Primitive Types {}", fixedOrPatternValue.getIdBase()); return resolvedBase.equalsDeep(fixedOrPatternValue); } else { - logger.debug("Handling Complex Types {}", fixedOrPatternValue.fhirType()); + logger.trace("Handling Complex Types {}", fixedOrPatternValue.fhirType()); // Iterate over the children of fixedOrPatternValue and compare them to the corresponding children in resolvedBase for (Property child : fixedOrPatternValue.children()) { if (child.hasValues()) { @@ -115,7 +115,7 @@ private static boolean compareBaseToFixedOrPattern(Base resolvedBase, Base fixed String childName = child.getName(); Property resolvedChild = resolvedBase.getChildByName(childName); - logger.debug("Handling Child {} {}", childName, resolvedChild); + logger.trace("Handling Child {} {}", childName, resolvedChild); // If the resolved base doesn't have this child, return false if (resolvedChild == null) { diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/ElementCopier.java b/src/main/java/de/medizininformatikinitiative/torch/util/ElementCopier.java index c6ea080..c183b92 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/util/ElementCopier.java +++ b/src/main/java/de/medizininformatikinitiative/torch/util/ElementCopier.java @@ -41,7 +41,7 @@ public class ElementCopier { */ public ElementCopier(CdsStructureDefinitionHandler handler) { this.handler = handler; - this.ctx = handler.ctx; + this.ctx = ResourceReader.ctx; this.pathBuilder=new FhirPathBuilder(handler); } @@ -57,7 +57,7 @@ public void copy(DomainResource src, DomainResource tgt, Attribute attribute) th String id = ResourceUtils.getPatientId(src); List profileurl = src.getMeta().getProfile(); StructureDefinition structureDefinition = handler.getDefinition(profileurl); - logger.debug("Empty Structuredefinition? {} {}", structureDefinition.isEmpty(),profileurl.getFirst().getValue()); + logger.trace("Empty Structuredefinition? {} {}", structureDefinition.isEmpty(),profileurl.getFirst().getValue()); List legalExtensions = new LinkedList<>(); @@ -67,18 +67,18 @@ public void copy(DomainResource src, DomainResource tgt, Attribute attribute) th ElementDefinition elementDefinition =snapshot.getElementById(attribute.getAttributeRef()); TerserUtilHelper helper = TerserUtilHelper.newHelper(ctx, tgt); - logger.debug("{} TGT set {}",id, tgt.getClass()); - logger.debug("{} Attribute FHIR PATH {}", id, attribute.getAttributeRef()); + logger.trace("{} TGT set {}",id, tgt.getClass()); + logger.trace("{} Attribute FHIR PATH {}", id, attribute.getAttributeRef()); try { - logger.debug("Attribute Path {}", attribute.getAttributeRef()); + logger.trace("Attribute Path {}", attribute.getAttributeRef()); String fhirPath = pathBuilder.handleSlicingForFhirPath(attribute.getAttributeRef(), snapshot); - logger.debug("FHIR PATH {}", fhirPath); + logger.trace("FHIR PATH {}", fhirPath); List elements = ctx.newFhirPath().evaluate(src, fhirPath, Base.class); - logger.debug("Elements received {}", fhirPath); + logger.trace("Elements received {}", fhirPath); if (elements.isEmpty()) { if (attribute.isMustHave()) { throw new MustHaveViolatedException("Attribute " + attribute.getAttributeRef() + " must have a value"); @@ -89,21 +89,21 @@ public void copy(DomainResource src, DomainResource tgt, Attribute attribute) th if (elements.size() == 1) { if (terserFHIRPATH.endsWith("[x]")) { - logger.debug("Tersertobehandled {}", terserFHIRPATH); + logger.trace("Tersertobehandled {}", terserFHIRPATH); String type = capitalizeFirstLetter(elements.getFirst().fhirType()); terserFHIRPATH = terserFHIRPATH.replace("[x]", type); } - logger.debug("Setting {} {}", terserFHIRPATH, elements.getFirst().fhirType()); + logger.trace("Setting {} {}", terserFHIRPATH, elements.getFirst().fhirType()); try { TerserUtil.setFieldByFhirPath(ctx.newTerser(), terserFHIRPATH, tgt, elements.getFirst()); } catch (Exception e) { if (elementDefinition.hasType()) { elementDefinition.getType().getFirst().getWorkingCode(); //TODO - logger.debug("Element not recognized {} {}", terserFHIRPATH, elementDefinition.getType().getFirst().getWorkingCode()); + logger.trace("Element not recognized {} {}", terserFHIRPATH, elementDefinition.getType().getFirst().getWorkingCode()); try { Base casted = factory.stringtoPrimitive(elements.getFirst().toString(),elementDefinition.getType().getFirst().getWorkingCode()); - logger.debug("Casted {}",casted.fhirType()); + logger.trace("Casted {}",casted.fhirType()); TerserUtil.setFieldByFhirPath(ctx.newTerser(), terserFHIRPATH, tgt, casted); }catch (Exception casterException){ logger.warn("Element not recognized and cast unsupported currently {} {} ",terserFHIRPATH,elementDefinition.getType().getFirst().getWorkingCode()); @@ -118,7 +118,7 @@ public void copy(DomainResource src, DomainResource tgt, Attribute attribute) th } else { - logger.info("terserFHIRPATH {} ", terserFHIRPATH); + logger.trace("terserFHIRPATH {} ", terserFHIRPATH); String[] elementParts = terserFHIRPATH.split("\\."); //check if fieldname or deeper in the branch if (elementParts.length > 2) { @@ -131,16 +131,16 @@ public void copy(DomainResource src, DomainResource tgt, Attribute attribute) th if (endIndex != -1) { String ParentPath = attribute.getAttributeRef().substring(0, endIndex); - logger.debug("ParentPath {}", ParentPath); - logger.debug("Elemente {}", snapshot.getElementByPath(ParentPath)); + logger.trace("ParentPath {}", ParentPath); + logger.trace("Elemente {}", snapshot.getElementByPath(ParentPath)); String type = snapshot.getElementByPath(ParentPath).getType().getFirst().getWorkingCode(); elements.forEach(element -> helper.setField(ParentPath, type, element)); } } else { - logger.debug("Base Field to be Set {} ", elementParts.length); + logger.trace("Base Field to be Set {} ", elementParts.length); // Convert the list to an array IBase[] elementsArray = elements.toArray(new IBase[0]); - logger.info("elementsArray {} ", elementsArray.length); + logger.trace("elementsArray {} ", elementsArray.length); // Now pass the array as varargs TerserUtil.setField(ctx, elementParts[1], (IBaseResource) tgt, elementsArray); } diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/FhirNavigator.java b/src/main/java/de/medizininformatikinitiative/torch/util/FhirNavigator.java deleted file mode 100644 index 16ff7db..0000000 --- a/src/main/java/de/medizininformatikinitiative/torch/util/FhirNavigator.java +++ /dev/null @@ -1,54 +0,0 @@ -package de.medizininformatikinitiative.torch.util; - -import ca.uhn.fhir.context.FhirContext; -import org.hl7.fhir.r4.model.Base; -import org.hl7.fhir.r4.model.Resource; - -import java.util.List; - -public class FhirNavigator { - - private FhirContext fhirContext; - - public FhirNavigator() { - fhirContext = FhirContext.forR4(); - } - - /** - * Navigates to the element with the given ID in the given resource. - * TODO: Use for more involved navigation. - * @param resource The resource to navigate. - * @param elementId The ID of the element to navigate to. - * @return The navigated element, or null if the path is invalid. - */ - public Base navigateToElement(Resource resource, String elementId) { - // Split the elementId into parts using the dot as a delimiter - String[] pathParts = elementId.split("\\."); - - // Skip the first part as it refers to the resource type - Base element = resource; - - // Start from the second part - for (int i = 1; i < pathParts.length; i++) { - String part = pathParts[i]; - - // Retrieve the child element dynamically - element = getChildElement(element, part); - if (element == null) { - return null; // Return null if the path is invalid - } - } - - // Return the final navigated element - return element; - } - - private Base getChildElement(Base element, String childName) { - - List children = element.listChildrenByName(childName); - if (children.isEmpty()) { - return null; // No matching child found - } - return children.get(0); // Assuming we're interested in the first matching child - } -} diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/FhirSearchBuilder.java b/src/main/java/de/medizininformatikinitiative/torch/util/FhirSearchBuilder.java index 0aa2717..6e6b7bd 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/util/FhirSearchBuilder.java +++ b/src/main/java/de/medizininformatikinitiative/torch/util/FhirSearchBuilder.java @@ -2,22 +2,13 @@ import de.medizininformatikinitiative.torch.model.AttributeGroup; -import java.util.ArrayList; import java.util.List; -import static de.medizininformatikinitiative.torch.util.BatchUtils.splitListIntoBatches; - public class FhirSearchBuilder { - public static int batchSize = 100; - - // Change global batch size - public static void setBatchsize(int batchSize) { - FhirSearchBuilder.batchSize = batchSize; - } - public String getSearchBatch(AttributeGroup group, List batch) { + public static String getSearchParam(AttributeGroup group, List batch) { String filter = ""; if (group.hasFilter()) { filter = "&" + group.getFilterString(); @@ -33,6 +24,27 @@ public String getSearchBatch(AttributeGroup group, List batch) { } + public static String getConsent(List batch) { + String parameters; + + parameters = "patient=" + String.join(",",batch); + + parameters += "&_profile=https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-einwilligung"; + return parameters; + + } + + public static String getEncounter(List batch) { + String parameters; + + parameters = "patient=" + String.join(",",batch); + + parameters += "&_profile=https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung"; + return parameters; + + } + + diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/Pair.java b/src/main/java/de/medizininformatikinitiative/torch/util/Pair.java deleted file mode 100644 index 3d6d5cb..0000000 --- a/src/main/java/de/medizininformatikinitiative/torch/util/Pair.java +++ /dev/null @@ -1,18 +0,0 @@ -package de.medizininformatikinitiative.torch.util; - -public class Pair { - public final X first; - public final Y second; - - public Pair(X first, Y second) { - this.first = first; - this.second = second; - } - - @Override - public String toString() { - return "(" + first + ", " + second + ")"; - } - - // You can add methods like equals(), hashCode() if needed -} diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/Redaction.java b/src/main/java/de/medizininformatikinitiative/torch/util/Redaction.java index f24c5b9..864450f 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/util/Redaction.java +++ b/src/main/java/de/medizininformatikinitiative/torch/util/Redaction.java @@ -29,35 +29,38 @@ public Redaction(CdsStructureDefinitionHandler CDS) { this.slicing= new Slicing(CDS); } - public Base redact(Base base){ + public Base redact(Base base) { /* * Check if the base is a DomainResource and if it has a profile. Used for initial redaction. */ StructureDefinition structureDefinition; - String elementID =""; + String elementID = ""; if (base instanceof DomainResource resource) { if (resource.hasMeta()) { CanonicalType profileurl = resource.getMeta().getProfile().getFirst(); structureDefinition=CDS.getDefinition(resource.getMeta().getProfile()); - - if(!Objects.equals(profileurl.getValue(), structureDefinition.getUrl())){ - logger.warn("Profile Missmatch {} {}",structureDefinition.getUrl(),profileurl.getValue()); + if(structureDefinition==null){ + logger.warn("Unknown Profile {}",profileurl); + return new Patient(); + } + if (!Objects.equals(profileurl.getValue(), structureDefinition.getUrl())) { + logger.warn("Profile Missmatch {} {}", structureDefinition.getUrl(), profileurl.getValue()); } // Check if structureDefinition is not null if (structureDefinition != null) { elementID = String.valueOf(resource.getResourceType()); - return redact(base,elementID,0,structureDefinition); + return redact(base, elementID, 0, structureDefinition); } else { logger.error("StructureDefinition is null for profile URL: {}", profileurl.getValue()); // Handle the case where structureDefinition is null // This could be throwing an exception, setting a default value, or other error handling logic - throw new RuntimeException("No Structure Definition known for "+profileurl.getValue()); + throw new RuntimeException("No Structure Definition known for " + profileurl.getValue()); } } - }else{ + } else { throw new RuntimeException("Trying to Redact Base Element that is not a ressource"); @@ -82,31 +85,29 @@ public Base redact(Base base, String elementID, int recursion, StructureDefiniti AtomicBoolean childrenEmpty = new AtomicBoolean(true); recursion++; - StructureDefinition.StructureDefinitionSnapshotComponent snapshot=structureDefinition.getSnapshot(); + StructureDefinition.StructureDefinitionSnapshotComponent snapshot = structureDefinition.getSnapshot(); ElementDefinition definition = snapshot.getElementById(elementID); - if(definition==null){ - logger.warn("Definiton unknown {} {} Element ID {} {}",base.fhirType(), base.getIdBase(),elementID, structureDefinition.getUrl()); - } else if (definition.hasSlicing()) { + if (definition == null) { + logger.warn("Definiton unknown {} {} Element ID {} {}", base.fhirType(), base.getIdBase(), elementID, structureDefinition.getUrl()); + } else if (definition.hasSlicing()) { ElementDefinition slicedElement = slicing.checkSlicing(base, elementID, structureDefinition); - if(slicedElement!=null){ - if(slicedElement.hasId()){ - //logger.warn("Found Sliced Element {}", slicedElement.getIdElement().toString()); - elementID=slicedElement.getIdElement().toString(); - - } - else{ - logger.warn("Sliced Element has no valid ID {}",elementID); - } - - } - else{ - logger.warn("Sliced Element is null {}",elementID); - } + if (slicedElement != null) { + if (slicedElement.hasId()) { + //logger.warn("Found Sliced Element {}", slicedElement.getIdElement().toString()); + elementID = slicedElement.getIdElement().toString(); + + } else { + logger.warn("Sliced Element has no valid ID {}", elementID); + } + + } else { + logger.warn("Sliced Element is null {}", elementID); + } } int finalRecursion = recursion; @@ -116,7 +117,7 @@ public Base redact(Base base, String elementID, int recursion, StructureDefiniti String childID = finalElementID + "." + child.getName(); ElementDefinition childDefinition = null; - logger.debug("Child to be handled {}",childID); + logger.trace("Child to be handled {}",childID); String type = ""; int min=0; try { @@ -128,7 +129,7 @@ public Base redact(Base base, String elementID, int recursion, StructureDefiniti try { type=child.getTypeCode(); min=child.getMinCardinality(); - logger.debug("{} Standard Type {} with cardinality {} ",child.getName(),type,min); + logger.trace("{} Standard Type {} with cardinality {} ",child.getName(),type,min); } catch (NullPointerException ex) { logger.error(" Child Type Unknown {}", childID,child.getName()); @@ -149,7 +150,7 @@ public Base redact(Base base, String elementID, int recursion, StructureDefiniti base.setProperty(child.getName(), element); } else if (!value.isPrimitive()) { - redact(value, finalChildID, finalRecursion, structureDefinition); + redact(value, finalChildID, finalRecursion, structureDefinition); } }); diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/ResourceUtils.java b/src/main/java/de/medizininformatikinitiative/torch/util/ResourceUtils.java index a64923f..17c60cb 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/util/ResourceUtils.java +++ b/src/main/java/de/medizininformatikinitiative/torch/util/ResourceUtils.java @@ -52,6 +52,11 @@ public static String getPatientId(DomainResource resource) throws PatientIdNotFo } try { + if (resource instanceof Consent consent) { + if (consent.hasPatient()) { + return getPatientReference(consent.getPatient().getReference()); + } + } else{ // Use reflection to check if the method 'hasSubject' exists Method hasSubjectMethod = resource.getClass().getMethod("hasSubject"); boolean hasSubject = (Boolean) hasSubjectMethod.invoke(resource); @@ -69,15 +74,11 @@ public static String getPatientId(DomainResource resource) throws PatientIdNotFo // Use reflection to get the 'getReference' method from 'subject' Method getReferenceMethod = subject.getClass().getMethod("getReference"); String reference = (String) getReferenceMethod.invoke(subject); - if (reference != null && reference.startsWith("Patient/")) { - return reference.substring("Patient/".length()); - } - else{ - throw new PatientIdNotFoundException("Reference does not start with 'Patient/': " + reference); - } + return getPatientReference(reference); } } + } throw new PatientIdNotFoundException("Patient Reference not found "); } catch (Exception e) { // Handle reflection exceptions @@ -88,6 +89,15 @@ public static String getPatientId(DomainResource resource) throws PatientIdNotFo throw new PatientIdNotFoundException("Patient ID not found in the given resource"); } + + public static String getPatientReference(String reference) throws PatientIdNotFoundException { + if (reference != null && reference.startsWith("Patient/")) { + return reference.substring("Patient/".length()); + } else { + throw new PatientIdNotFoundException("Reference does not start with 'Patient/': " + reference); + } + } + public static String getPatientIdFromBundle(Bundle bundle) throws PatientIdNotFoundException { if (bundle == null || bundle.getEntry().isEmpty()) { throw new PatientIdNotFoundException("Bundle is empty or null"); diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/ResultFileManager.java b/src/main/java/de/medizininformatikinitiative/torch/util/ResultFileManager.java index d1e015d..5bb71f2 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/util/ResultFileManager.java +++ b/src/main/java/de/medizininformatikinitiative/torch/util/ResultFileManager.java @@ -88,21 +88,12 @@ public Mono initJobDir(String jobId) { // Get the path to the job directory Path jobDir = resultsDirPath.resolve(jobId); - // If the directory exists, delete it recursively - if (Files.exists(jobDir)) { - Files.walk(jobDir) - .sorted(Comparator.reverseOrder()) // Sort to delete files first, then directories - .forEach(path -> { - try { - Files.delete(path); - } catch (IOException e) { - logger.error("Failed to delete path {}: {}", path, e.getMessage()); - } - }); + + if (!Files.exists(jobDir)) { + Files.createDirectories(jobDir); + } - logger.debug("Removed Dir {}", jobDir); - // Recreate the directory after cleanup - Files.createDirectories(jobDir); + return jobDir; } catch (IOException e) { logger.error("Failed to initialize directory for jobId {}: {}", jobId, e.getMessage()); @@ -183,7 +174,7 @@ public Map loadBundleFromFileSystem(String jobId, String request // Set the transactionTime and requestUrl into the response response.put("transactionTime", transactionTime); - response.put("request", hostname+"/fhir/$extract-data"); + response.put("request", hostname + "/fhir/$extract-data"); response.put("requiresAccessToken", false); response.put("output", outputFiles); logger.debug("OutputFiles size {}",outputFiles.size()); diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/Slicing.java b/src/main/java/de/medizininformatikinitiative/torch/util/Slicing.java index dc43062..bc29c7c 100644 --- a/src/main/java/de/medizininformatikinitiative/torch/util/Slicing.java +++ b/src/main/java/de/medizininformatikinitiative/torch/util/Slicing.java @@ -1,9 +1,11 @@ package de.medizininformatikinitiative.torch.util; import ca.uhn.fhir.context.FhirContext; - import de.medizininformatikinitiative.torch.CdsStructureDefinitionHandler; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.Base; +import org.hl7.fhir.r4.model.Element; +import org.hl7.fhir.r4.model.ElementDefinition; +import org.hl7.fhir.r4.model.StructureDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -16,7 +18,6 @@ public class Slicing { private static final Logger logger = LoggerFactory.getLogger(Slicing.class); - private FhirContext ctx; CdsStructureDefinitionHandler handler; @@ -28,7 +29,7 @@ public class Slicing { */ public Slicing(CdsStructureDefinitionHandler handler) { this.handler = handler; - this.ctx = handler.ctx; + } /** @@ -45,33 +46,33 @@ public ElementDefinition checkSlicing(Base base, String elementID, StructureDefi String fhirPath = "StructureDefinition.snapshot.element.where(path = '" + elementID + "')"; ElementDefinition slicedElement = snapshot.getElementByPath(elementID); - if(elementID.contains(":")){ - slicedElement = snapshot.getElementById(elementID); + if (elementID.contains(":")) { + slicedElement = snapshot.getElementById(elementID); } AtomicReference returnElement = new AtomicReference<>(slicedElement); - if (slicedElement == null ) { - logger.warn("slicedElement null {} {}",elementID,structureDefinition.getUrl()); + if (slicedElement == null) { + logger.warn("slicedElement null {} {}", elementID, structureDefinition.getUrl()); return null; } if (!slicedElement.hasSlicing()) { - logger.warn("Element has no slicing {} {}",elementID,structureDefinition.getUrl()); + logger.warn("Element has no slicing {} {}", elementID, structureDefinition.getUrl()); return null; // Return null if the sliced element is not found or has no slicing } List slicingDiscriminator = slicedElement.getSlicing().getDiscriminator(); - List ElementDefinition = ctx.newFhirPath().evaluate(structureDefinition, fhirPath, ElementDefinition.class); + List ElementDefinition = ResourceReader.ctx.newFhirPath().evaluate(structureDefinition, fhirPath, ElementDefinition.class); ElementDefinition.forEach(element -> { - //logger.debug("Slice to be handled {}",element.getIdElement()); + logger.trace("Slice to be handled {}",element.getIdElement()); boolean foundSlice = true; if (element.hasSliceName()) { //iterate over every discriminator and test if base holds for it for (ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent discriminator : slicingDiscriminator) { if (!resolveDiscriminator(base, element, discriminator, snapshot)) { - //logger.debug("Check failed {}", element.getIdElement()); + logger.trace("Check failed {}", element.getIdElement()); foundSlice = false; break; // Stop iterating if condition check fails } @@ -114,18 +115,18 @@ public List generateConditionsForFHIRPath(String elementID, StructureDef for (ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent discriminator : slicing.getDiscriminator()) { String path = discriminator.getPath(); - logger.debug("Slicing Discriminator {} {}",discriminator.getType(),path); + logger.trace("Slicing Discriminator {} {}",discriminator.getType(),path); // Generate FHIR Path condition based on the discriminator type and path switch (discriminator.getType()) { case VALUE, PATTERN: - logger.debug("Pattern discriminator found"); + logger.trace("Pattern discriminator found"); conditions.addAll(collectConditionsfromPattern(elementID, snapshot, path)); break; case EXISTS: conditions.add(slicedElement.getPath() + "." + path + ".exists()"); break; case TYPE: - logger.debug("Type discriminator found"); + logger.trace("Type discriminator found"); conditions.add(slicedElement.getPath() + "." + path + ".ofType({type})"); break; case PROFILE: diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/TimeUtils.java b/src/main/java/de/medizininformatikinitiative/torch/util/TimeUtils.java new file mode 100644 index 0000000..8ea487b --- /dev/null +++ b/src/main/java/de/medizininformatikinitiative/torch/util/TimeUtils.java @@ -0,0 +1,9 @@ +package de.medizininformatikinitiative.torch.util; + +public interface TimeUtils { + + + static double durationSecondsSince(long startNanoTime) { + return ((double) (System.nanoTime() - startNanoTime)) / 1e9; + } +} diff --git a/src/main/java/de/medizininformatikinitiative/torch/util/TransformedResource.java b/src/main/java/de/medizininformatikinitiative/torch/util/TransformedResource.java deleted file mode 100644 index 55e809e..0000000 --- a/src/main/java/de/medizininformatikinitiative/torch/util/TransformedResource.java +++ /dev/null @@ -1,27 +0,0 @@ -package de.medizininformatikinitiative.torch.util; -import org.hl7.fhir.r4.model.DomainResource; -import org.hl7.fhir.r4.model.Resource; - -public class TransformedResource { - private final String id; - private final Resource resource; - private final boolean mustHaveViolated; - - public TransformedResource(String id, Resource resource, boolean mustHaveViolated) { - this.id = id; - this.resource = resource; - this.mustHaveViolated = mustHaveViolated; - } - - public String getId() { - return id; - } - - public Resource getResource() { - return resource; - } - - public boolean isMustHaveViolated() { - return mustHaveViolated; - } -} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 077c2e2..29ec834 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -4,9 +4,22 @@ server: port: 8080 torch: profile: - dir: src/test/resources/StructureDefinitions + dir: structureDefinitions + mapping: + consent: mappings/consent-mappings_fhir.json + consent_to_profile: mappings/profile_to_consent.json fhir: - url: http://localhost:8082/fhir + user: "" + password: "" + oauth: + issuer: + uri: + client: + id: + secret: + + url: http://localhost:8081/fhir + pageCount: 500 flare: url: http://localhost:8084 results: @@ -14,9 +27,13 @@ torch: persistence: PT12H30M5S # Time Block in ISO 8601 format batchsize: 100 maxconcurrency: 100 + mappingsFile: ontology/mapping_cql.json + conceptTreeFile: ontology/mapping_tree.json + dseMappingTreeFile: ontology/dse_mapping_tree.json + useCql: true nginx: - servername: localhost:8080 - filelocation: localhost:8080/output + servername: http://localhost:8080 + filelocation: http://localhost:8080/output logging: level: org.springframework.web.reactive.function.client: info @@ -24,6 +41,9 @@ logging: reactor: info de.medizininformatikinitiative.torch: ${LOG_LEVEL:info} + spring: + profiles: + active: active codec: max-in-memory-size: 100MB diff --git a/src/main/resources/de/medizininformatikinitiative/torch/cql/Library.json b/src/main/resources/de/medizininformatikinitiative/torch/cql/Library.json new file mode 100644 index 0000000..77de7f3 --- /dev/null +++ b/src/main/resources/de/medizininformatikinitiative/torch/cql/Library.json @@ -0,0 +1,20 @@ +{ + "resourceType": "Library", + "status": "active", + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/library-type", + "code": "logic-library" + } + ] + }, + "subjectCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/resource-types", + "code": "Patient" + } + ] + } +} diff --git a/src/main/resources/de/medizininformatikinitiative/torch/cql/Measure.json b/src/main/resources/de/medizininformatikinitiative/torch/cql/Measure.json new file mode 100644 index 0000000..c682532 --- /dev/null +++ b/src/main/resources/de/medizininformatikinitiative/torch/cql/Measure.json @@ -0,0 +1,42 @@ +{ + "resourceType": "Measure", + "status": "active", + "subjectCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/resource-types", + "code": "Patient" + } + ] + }, + "scoring": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/measure-scoring", + "code": "cohort" + } + ] + }, + "group": [ + { + "population": [ + { + "code": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/measure-population", + "code": "initial-population" + } + ] + }, + "criteria": { + "language": "text/cql", + "expression": "InInitialPopulation" + } + } + ] + } + ] +} + + diff --git a/src/main/resources/de/medizininformatikinitiative/torch/cql/PatientListParams.json b/src/main/resources/de/medizininformatikinitiative/torch/cql/PatientListParams.json new file mode 100644 index 0000000..80995f4 --- /dev/null +++ b/src/main/resources/de/medizininformatikinitiative/torch/cql/PatientListParams.json @@ -0,0 +1,21 @@ +{ + "resourceType": "Parameters", + "parameter": [ + { + "name": "periodStart", + "valueDate": "2000" + }, + { + "name": "periodEnd", + "valueDate": "2030" + }, + { + "name": "measure", + "valueString": "" + }, + { + "name": "reportType", + "valueCode": "subject-list" + } + ] +} diff --git a/src/main/resources/mappings/consent-mappings_fhir.json b/src/main/resources/mappings/consent-mappings_fhir.json new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/mappings/profile_to_consent.json b/src/main/resources/mappings/profile_to_consent.json new file mode 100644 index 0000000..b5aacba --- /dev/null +++ b/src/main/resources/mappings/profile_to_consent.json @@ -0,0 +1,148 @@ +{ + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationStatement": "MedicationStatement.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/medikationsliste": "List.date", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationRequest": "authoredOn", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/Medication": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationAdministration": "MedicationAdministration.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-blut-preduktal-durch-pulsoxymetrie": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-kern": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-rektal": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-trommelfell": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorische-sauerstofffraktion-eingestellt": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/extrakorporales-verfahren": "Procedure.performed[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/systemischer-vaskulaerer-widerstandsindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutfluss-cardiovasculaeres-geraet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/horowitz-in-arteriellem-blut": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dynamische-kompliance": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontanes-atemzugvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/mechanische-atemfrequenz-beatmet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-achsel": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutdruck-generisch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/maximaler-beatmungsdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergewicht-percentil-altersabhaengig": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/exspiratorischer-sauerstoffpartialdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffgasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/zentralvenoeser-blutdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/einstellung-einatmungszeit-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemzugvolumen-waehrend-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/parameter-von-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungszeit-hohem-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/eingestellter-inspiratorischer-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/einstellung-ausatmungszeit-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/parameter-von-extrakorporalen-verfahren": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dauer-haemodialysesitzung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-stirn": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/ionisiertes-kalzium-nierenersatzverfahren": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-blut-postduktal-durch-pulsoxymetrie": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorische-sauerstofffraktion": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-gelenk": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/kopfumfang": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemfrequenz": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-herzindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumen-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergroesse": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-arteriellen-blut-durch-pulsoxymetrie": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/substituatvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemwegsdruck-bei-null-expiratorischem-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/zeitverhaeltnis-ein-ausatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungsvolumen-pro-minute-maschineller-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/monitoring-und-vitaldaten": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-nasen-rachen-raum": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontane-atemfrequenz-beatmet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalarterieller-wedge-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/rechtsventrikulaerer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/periphere-artierielle-sauerstoffsaettigung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksatrialer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-halswirbelsaeule": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/icu-device": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-generisch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/druckdifferenz-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorischer-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalvaskulaerer-widerstandsindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/unterstuetzungsdruck-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemwegsdruck-bei-mittlerem-expiratorischem-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/venoeser-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergroesse-percentil": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-vaginal": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemzugvolumen-einstellung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/rechtsatrialer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/mittlerer-beatmungsdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/positiv-endexpiratorischer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/herzzeitvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergewicht": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-speiseroehre": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/substituatfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/endexpiratorischer-kohlendioxidpartialdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-leiste": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/devicemetric-eingestellte-gemessene-parameter-extrakorporale-verfahren": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumenindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmung": "Procedure.performed[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungszeit-niedrigem-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontanes-mechanisches-atemzugvolumen-waehrend-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalarterieller-blutdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontane-mechanische-atemfrequenz-beatmet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/haemodialyse-blutfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-nasal": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/puls": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dauer-extrakorporaler-gasaustausch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-harnblase": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/ideales-koerpergewicht": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-brust": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-atemwege": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-lendenwirbelsaeule": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/exspiratorischer-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/arterieller-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/herzfrequenz": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-herzindex-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutflussindex-extrakorporaler-gasaustausch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-schlagvolumenindex-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-unter-der-zunge": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-blut": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutfluss-extrakorporaler-gasaustausch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/intrakranieller-druck-icp": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/devicemetric-eingestellte-gemessene-parameter-beatmung": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-brustwirbelsaeule": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-herzzeitvolumen-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Substance": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Organization": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Specimen": "Specimen.collection.collected[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/SpecimenCore": "Specimen.collection.collected[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure": "Procedure.performed[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Vitalstatus": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/PatientPseudonymisiert": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/ResearchSubject": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Patient": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Todesursache": "Condition.recordedDate", + "http://fhir.de/ConsentManagement/StructureDefinition/DocumentReference": "DocumentReference.date", + "http://fhir.de/ConsentManagement/StructureDefinition/TemplateFrame": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Consent": "Consent.dateTime", + "http://fhir.de/ConsentManagement/StructureDefinition/TemplateModule": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Domain/Organization": "", + "http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireComposed": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Domain/ResearchStudy": "", + "http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireResponse": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Provenance": "Provenance.recorded", + "http://fhir.de/ConsentManagement/StructureDefinition/Patient": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-diagnose/StructureDefinition/Diagnose": "Condition.recordedDate", + "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/genotyp": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/medikationsempfehlung": "Task.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/empfohlene-folgemassnahme": "Task.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/familienanamnese": "FamilyMemberHistory.date", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/ergebnis-zusammenfassung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/molekulargenetischer-befundbericht": "DiagnosticReport.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/diagnostische-implikation": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/anforderung-genetischer-test": "ServiceRequest.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/mikrosatelliteninstabilitaet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/mutationslast": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/variante": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/therapeutische-implikation": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/untersuchte-region": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/polygener-risiko-score": "RiskAssessment.occurrence[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ServiceRequestLab": "ServiceRequest.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab": "DiagnosticReport.effective[x]" +} \ No newline at end of file diff --git a/src/test/java/de/medizininformatikinitiative/torch/AbstractIT.java b/src/test/java/de/medizininformatikinitiative/torch/AbstractIT.java index d4229c0..f8693eb 100644 --- a/src/test/java/de/medizininformatikinitiative/torch/AbstractIT.java +++ b/src/test/java/de/medizininformatikinitiative/torch/AbstractIT.java @@ -2,9 +2,13 @@ import ca.uhn.fhir.context.FhirContext; import com.fasterxml.jackson.databind.ObjectMapper; +import de.medizininformatikinitiative.torch.cql.CqlClient; import de.medizininformatikinitiative.torch.exceptions.PatientIdNotFoundException; +import de.medizininformatikinitiative.torch.model.mapping.DseMappingTreeBase; +import de.medizininformatikinitiative.torch.service.DataStore; import de.medizininformatikinitiative.torch.util.ResourceReader; import de.medizininformatikinitiative.torch.util.ResourceUtils; +import de.numcodex.sq2cql.Translator; import org.hl7.fhir.r4.model.Bundle; import org.hl7.fhir.r4.model.Resource; import org.junit.jupiter.api.Assertions; @@ -15,18 +19,23 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.annotation.Bean; +import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.DynamicPropertyRegistry; import org.springframework.test.context.DynamicPropertySource; +import org.springframework.web.reactive.function.client.ExchangeFilterFunction; +import org.springframework.web.reactive.function.client.ExchangeFilterFunctions; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.function.client.WebClientResponseException; import org.testcontainers.containers.ComposeContainer; -import org.testcontainers.containers.DockerComposeContainer; import org.testcontainers.containers.output.Slf4jLogConsumer; import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClient; +import reactor.netty.resources.ConnectionProvider; import java.io.File; import java.io.IOException; @@ -45,31 +54,61 @@ public abstract class AbstractIT { protected static final Logger logger = LoggerFactory.getLogger(AbstractIT.class); - + @Container + public static ComposeContainer environment = + new ComposeContainer(new File("src/test/resources/docker-compose.yml")) + .withExposedService("blaze", 8080, Wait.forListeningPort().withStartupTimeout(Duration.ofMinutes(10))) + .withLogConsumer("blaze", new Slf4jLogConsumer(logger).withPrefix("blaze")) + .withExposedService("flare", 8080, Wait.forListeningPort().withStartupTimeout(Duration.ofMinutes(10))) + .withLogConsumer("flare", new Slf4jLogConsumer(logger).withPrefix("flare")); + protected static boolean dataImported = false; protected final WebClient webClient; protected final WebClient flareClient; protected final ResourceTransformer transformer; protected final DataStore dataStore; protected final CdsStructureDefinitionHandler cds; - protected final FhirContext fhirContext; protected final BundleCreator bundleCreator; protected final ObjectMapper objectMapper; - - protected static boolean dataImported = false; - + protected final CqlClient cqlClient; + protected final Translator cqlQueryTranslator; @Value("${torch.fhir.testPopulation.path}") private String testPopulationPath; + protected final FhirContext fhirContext; + + protected final DseMappingTreeBase dseMappingTreeBase; + @Bean @Autowired - public AbstractIT( - @Qualifier("fhirClient") WebClient webClient, + @Qualifier("fhirClient") + public WebClient fhirWebClient(@Value("${torch.fhir.url}") String baseUrl) { + logger.info("Initializing FHIR WebClient with URL: {}", baseUrl); + + ConnectionProvider provider = ConnectionProvider.builder("data-store") + .maxConnections(4) + .pendingAcquireMaxCount(500) + .build(); + HttpClient httpClient = HttpClient.create(provider); + WebClient.Builder builder = WebClient.builder() + .baseUrl(baseUrl) + .clientConnector(new ReactorClientHttpConnector(httpClient)) + .defaultHeader("Accept", "application/fhir+json"); + + + return builder.build(); + } + + @Autowired + public AbstractIT(@Qualifier("fhirClient") WebClient webClient, @Qualifier("flareClient") WebClient flareClient, ResourceTransformer transformer, DataStore dataStore, CdsStructureDefinitionHandler cds, FhirContext fhirContext, BundleCreator bundleCreator, - ObjectMapper objectMapper) { + ObjectMapper objectMapper, + CqlClient cqlClient, + Translator cqlQueryTranslator, + DseMappingTreeBase dseMappingTreeBase) { this.webClient = webClient; this.flareClient = flareClient; this.transformer = transformer; @@ -78,18 +117,14 @@ public AbstractIT( this.fhirContext = fhirContext; this.bundleCreator = bundleCreator; this.objectMapper = objectMapper; - } + this.cqlClient = cqlClient; + this.cqlQueryTranslator = cqlQueryTranslator; + this.dseMappingTreeBase = dseMappingTreeBase; - @Container - public static ComposeContainer environment = - new ComposeContainer(new File("src/test/resources/docker-compose.yml")) - .withExposedService("blaze", 8080, Wait.forListeningPort().withStartupTimeout(Duration.ofMinutes(10))) - .withLogConsumer("blaze", new Slf4jLogConsumer(logger).withPrefix("blaze")) - .withExposedService("flare", 8080, Wait.forListeningPort().withStartupTimeout(Duration.ofMinutes(10))) - .withLogConsumer("flare", new Slf4jLogConsumer(logger).withPrefix("flare")); + } @DynamicPropertySource - static void dynamicProperties(DynamicPropertyRegistry registry){ + static void dynamicProperties(DynamicPropertyRegistry registry) { environment.start(); checkServiceHealth("blaze", "/health"); checkServiceHealth("flare", "/cache/stats"); @@ -97,34 +132,9 @@ static void dynamicProperties(DynamicPropertyRegistry registry){ Integer blazePort = environment.getServicePort("blaze", 8080); String flareHost = environment.getServiceHost("flare", 8080); Integer flarePort = environment.getServicePort("flare", 8080); - logger.info("Blaze %s:%d Flare %s %d ".formatted(blazeHost,blazePort,flareHost,flarePort)); + logger.info("Blaze %s:%d Flare %s %d ".formatted(blazeHost, blazePort, flareHost, flarePort)); registry.add("torch.fhir.url", () -> "http://%s:%d/fhir".formatted(blazeHost, blazePort)); - registry.add("torch.flare.url", () -> "http://%s:%d".formatted(flareHost,flarePort)); - } - - @BeforeEach - void init() throws IOException { - if (!dataImported) { - webClient.post() - .bodyValue(Files.readString(Path.of(testPopulationPath))) - .header("Content-Type", "application/fhir+json") - .retrieve() - .toBodilessEntity() - .block(); - dataImported = true; - logger.info("Data Import on {}", webClient.options()); - } - logger.info("Setup Complete"); - } - - protected Map loadExpectedResources(List filePaths) throws IOException, PatientIdNotFoundException { - Map expectedResources = new HashMap<>(); - for (String filePath : filePaths) { - Bundle bundle = (Bundle) ResourceReader.readResource(filePath); - String patientId = ResourceUtils.getPatientIdFromBundle(bundle); - expectedResources.put(patientId, bundle); - } - return expectedResources; + registry.add("torch.flare.url", () -> "http://%s:%d".formatted(flareHost, flarePort)); } private static void checkServiceHealth(String service, String healthEndpoint) { @@ -163,7 +173,30 @@ private static void checkServiceHealth(String service, String healthEndpoint) { throw new RuntimeException("Health check failed for service: " + service + " at " + url); } + @BeforeEach + void init() throws IOException { + if (!dataImported) { + webClient.post() + .bodyValue(Files.readString(Path.of(testPopulationPath))) + .header("Content-Type", "application/fhir+json") + .retrieve() + .toBodilessEntity() + .block(); + dataImported = true; + logger.info("Data Import on {}", webClient.options()); + } + logger.info("Setup Complete"); + } + protected Map loadExpectedResources(List filePaths) throws IOException, PatientIdNotFoundException { + Map expectedResources = new HashMap<>(); + for (String filePath : filePaths) { + Bundle bundle = (Bundle) ResourceReader.readResource(filePath); + String patientId = ResourceUtils.getPatientIdFromBundle(bundle); + expectedResources.put(patientId, bundle); + } + return expectedResources; + } void validateBundles(Map bundles, Map expectedResources) { for (Map.Entry entry : bundles.entrySet()) { diff --git a/src/test/java/de/medizininformatikinitiative/torch/BaseTest.java b/src/test/java/de/medizininformatikinitiative/torch/BaseTest.java index 65983ed..7a92718 100644 --- a/src/test/java/de/medizininformatikinitiative/torch/BaseTest.java +++ b/src/test/java/de/medizininformatikinitiative/torch/BaseTest.java @@ -24,7 +24,7 @@ public class BaseTest { public static void setUp() { objectMapper = new ObjectMapper(); ctx = FhirContext.forR4(); - cds = new CdsStructureDefinitionHandler(ctx, "src/test/resources/StructureDefinitions/"); + cds = new CdsStructureDefinitionHandler("src/main/resources/StructureDefinitions/"); copier = new ElementCopier(cds); redaction = new Redaction(cds); } diff --git a/src/test/java/de/medizininformatikinitiative/torch/ConsentCodeMapperTest.java b/src/test/java/de/medizininformatikinitiative/torch/ConsentCodeMapperTest.java new file mode 100644 index 0000000..93a74a0 --- /dev/null +++ b/src/test/java/de/medizininformatikinitiative/torch/ConsentCodeMapperTest.java @@ -0,0 +1,48 @@ +package de.medizininformatikinitiative.torch; + +import de.medizininformatikinitiative.torch.util.ConsentCodeMapper; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.util.Set; + +import static org.junit.jupiter.api.Assertions.*; + +public class ConsentCodeMapperTest { + + private ConsentCodeMapper consentCodeMapper; + + // Setup the test by loading the actual consent-mappings JSON data + @BeforeEach + public void setUp() throws IOException { + // Use the real JSON file path or load a test JSON file + String consentFilePath = "src/test/resources/mappings/consent-mappings.json"; // Replace with actual path if needed + consentCodeMapper = new ConsentCodeMapper(consentFilePath); + } + + @Test + public void testGetRelevantCodes_withValidKey() { + // Test that codes are returned for the key "yes-yes-yes-yes" + Set relevantCodes = consentCodeMapper.getRelevantCodes("yes-yes-yes-yes"); + assertNotNull(relevantCodes); + assertFalse(relevantCodes.isEmpty(), "Relevant codes should not be empty"); + assertTrue(relevantCodes.contains("2.16.840.1.113883.3.1937.777.24.5.3.8"), "Should contain code 2.16.840.1.113883.3.1937.777.24.5.3.8"); + assertTrue(relevantCodes.contains("2.16.840.1.113883.3.1937.777.24.5.3.46"), "Should contain code 2.16.840.1.113883.3.1937.777.24.5.3.46"); + } + + @Test + public void testGetRelevantCodes_withInvalidKey() { + // Test that an empty list is returned for an invalid key + Set relevantCodes = consentCodeMapper.getRelevantCodes("invalid-key"); + assertNotNull(relevantCodes); + assertTrue(relevantCodes.isEmpty(), "Relevant codes should be empty for an invalid key"); + } + + @Test + public void testConsentMappingLoadedCorrectly() { + // Ensure that the map is loaded correctly with a valid key + Set relevantCodes = consentCodeMapper.getRelevantCodes("yes-yes-yes-yes"); + assertEquals(10, relevantCodes.size(), "Should contain 10 relevant codes for key 'yes-yes-yes-yes'"); + } +} diff --git a/src/test/java/de/medizininformatikinitiative/torch/ConsentProcessorTest.java b/src/test/java/de/medizininformatikinitiative/torch/ConsentProcessorTest.java new file mode 100644 index 0000000..270ee95 --- /dev/null +++ b/src/test/java/de/medizininformatikinitiative/torch/ConsentProcessorTest.java @@ -0,0 +1,71 @@ +package de.medizininformatikinitiative.torch; + +import de.medizininformatikinitiative.torch.exceptions.ConsentViolatedException; +import de.medizininformatikinitiative.torch.exceptions.PatientIdNotFoundException; +import de.medizininformatikinitiative.torch.util.*; +import org.hl7.fhir.r4.model.DomainResource; +import org.hl7.fhir.r4.model.Period; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.util.*; + +import static org.junit.Assert.assertThrows; + +public class ConsentProcessorTest extends BaseTest { + + ConsentCodeMapper consentCodeMapper=new ConsentCodeMapper("src/test/resources/mappings/consent-mappings.json"); + + public ConsentProcessorTest() throws IOException { + } + + @Test + public void testConsentProcessorFail() throws IOException { + + ConsentProcessor processor=new ConsentProcessor(ctx); + String[] resources = {"VHF006_Consent_Fail.json"}; + Arrays.stream(resources).forEach(resource -> { + assertThrows(ConsentViolatedException.class, () -> { + try { + + DomainResource resourceSrc = (DomainResource) ResourceReader.readResource("src/test/resources/InputResources/Consent/" + resource); + assert (Objects.equals(resourceSrc.getResourceType().toString(), "Consent")); + // Transform to extract patient and consent period information + Map> consentPeriodMap = processor.transformToConsentPeriodByCode(resourceSrc, consentCodeMapper.getRelevantCodes("yes-yes-yes-yes")); // Adjusted to include provisions + logger.debug("map size {}", consentPeriodMap.entrySet()); + // Update the map with the patient's consent periods + assert (!consentPeriodMap.get("2.16.840.1.113883.3.1937.777.24.5.3.10").isEmpty()); + + } catch (IOException e) { + throw new RuntimeException(e); + } + }); + + }); + } + + @Test + public void testConsentProcessor() throws IOException { + + ConsentProcessor processor=new ConsentProcessor(ctx); + String[] resources = {"VHF006_Consent.json"}; + Arrays.stream(resources).forEach(resource -> { + try { + + DomainResource resourceSrc = (DomainResource) ResourceReader.readResource("src/test/resources/InputResources/Consent/" + resource); + assert (Objects.equals(resourceSrc.getResourceType().toString(), "Consent")); + // Transform to extract patient and consent period information + Map> consentPeriodMap = processor.transformToConsentPeriodByCode(resourceSrc, consentCodeMapper.getRelevantCodes("yes-yes-yes-yes")); // Adjusted to include provisions + logger.debug("Consent map {}", consentPeriodMap.entrySet()); + // Update the map with the patient's consent periods + assert (!consentPeriodMap.get("2.16.840.1.113883.3.1937.777.24.5.3.10").isEmpty()); + + } catch (IOException e) { + throw new RuntimeException(e); + } catch (ConsentViolatedException e) { + throw new RuntimeException(e); + } + }); + } + +} \ No newline at end of file diff --git a/src/test/java/de/medizininformatikinitiative/torch/CrtdlTest.java b/src/test/java/de/medizininformatikinitiative/torch/CrtdlTest.java index 00c5d6c..6c3bd15 100644 --- a/src/test/java/de/medizininformatikinitiative/torch/CrtdlTest.java +++ b/src/test/java/de/medizininformatikinitiative/torch/CrtdlTest.java @@ -1,6 +1,5 @@ package de.medizininformatikinitiative.torch; -import de.medizininformatikinitiative.flare.model.sq.StructuredQuery; import de.medizininformatikinitiative.torch.model.Attribute; import de.medizininformatikinitiative.torch.model.Crtdl; import org.junit.jupiter.api.Test; @@ -10,7 +9,7 @@ import static org.junit.jupiter.api.Assertions.*; -public class CrtdlTest extends BaseTest{ +public class CrtdlTest extends BaseTest { @Test @@ -19,10 +18,10 @@ public void testCondition() { Crtdl crtdl = objectMapper.readValue(fis, Crtdl.class); assertNotNull(crtdl); Attribute attribute1 = crtdl.getDataExtraction().getAttributeGroups().getFirst().getAttributes().getFirst(); - assertEquals("Condition.code",attribute1.getAttributeRef()); + assertEquals("Condition.code", attribute1.getAttributeRef()); assertFalse(attribute1.isMustHave()); } catch (Exception e) { - logger.error(" ",e); + logger.error(" ", e); } } @@ -35,18 +34,16 @@ public void testObservation() { Crtdl crtdl = objectMapper.readValue(bytes, Crtdl.class); assertNotNull(crtdl); Attribute attribute2 = crtdl.getDataExtraction().getAttributeGroups().getFirst().getAttributes().get(1); - assertEquals("Observation.encounter",attribute2.getAttributeRef()); - assertTrue(!attribute2.isMustHave()); + assertEquals("Observation.encounter", attribute2.getAttributeRef()); + assertFalse(attribute2.isMustHave()); } catch (Exception e) { - logger.error(" ",e); + logger.error(" ", e); } } - - } diff --git a/src/test/java/de/medizininformatikinitiative/torch/FhirControllerIT.java b/src/test/java/de/medizininformatikinitiative/torch/FhirControllerIT.java index 146e092..f91f47c 100644 --- a/src/test/java/de/medizininformatikinitiative/torch/FhirControllerIT.java +++ b/src/test/java/de/medizininformatikinitiative/torch/FhirControllerIT.java @@ -1,27 +1,31 @@ package de.medizininformatikinitiative.torch; import ca.uhn.fhir.context.FhirContext; -import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.type.TypeFactory; +import de.medizininformatikinitiative.torch.cql.CqlClient; import de.medizininformatikinitiative.torch.exceptions.PatientIdNotFoundException; - import de.medizininformatikinitiative.torch.model.Crtdl; +import de.medizininformatikinitiative.torch.model.mapping.DseMappingTreeBase; import de.medizininformatikinitiative.torch.rest.FhirController; +import de.medizininformatikinitiative.torch.util.ResourceReader; +import org.hl7.fhir.r4.model.*; +import de.medizininformatikinitiative.torch.service.DataStore; +import de.numcodex.sq2cql.Translator; +import de.numcodex.sq2cql.model.structured_query.StructuredQuery; import org.hl7.fhir.r4.model.Bundle; - import org.hl7.fhir.r4.model.Resource; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.http.*; import org.springframework.web.client.HttpStatusCodeException; import org.springframework.web.reactive.function.client.WebClient; -import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.boot.test.web.server.LocalServerPort; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -32,30 +36,27 @@ import java.nio.file.Paths; import java.util.*; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import static org.junit.jupiter.api.Assertions.assertEquals; - -/*@Testcontainers -@ExtendWith(SpringExtension.class) -@ContextConfiguration(classes = AppConfig.class) -@SpringBootTest(classes = Torch.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -@ActiveProfiles("test") -*/ +import static org.junit.jupiter.api.Assertions.assertIterableEquals; @SpringBootTest(classes = Torch.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class FhirControllerIT extends AbstractIT { private static final String RESOURCE_PATH_PREFIX = "src/test/resources/"; - @LocalServerPort private int port; + @Autowired - FhirController fhirController; + ConsentHandler consentHandler; @Autowired public FhirControllerIT(@Qualifier("fhirClient") WebClient webClient, - @Qualifier("flareClient") WebClient flareClient, ResourceTransformer transformer, DataStore dataStore, CdsStructureDefinitionHandler cds, FhirContext context, BundleCreator bundleCreator, ObjectMapper objectMapper) { - super(webClient, flareClient, transformer, dataStore, cds, context, bundleCreator, objectMapper); + @Qualifier("flareClient") WebClient flareClient, ResourceTransformer transformer, DataStore dataStore, CdsStructureDefinitionHandler cds, FhirContext context, BundleCreator bundleCreator, ObjectMapper objectMapper, CqlClient cqlClient, + Translator cqlQueryTranslator, DseMappingTreeBase dseMappingTreeBase) { + super(webClient, flareClient, transformer, dataStore, cds, context, bundleCreator, objectMapper, cqlClient, cqlQueryTranslator, dseMappingTreeBase); } @Test @@ -81,17 +82,33 @@ public void testExtractEndpoint() throws PatientIdNotFoundException, IOException ); List filePaths = List.of( - "src/test/resources/CRTDL_Library/Parameters_all_fields.json"); + "src/test/resources/CRTDL_Parameters/Parameters_all_fields.json"); testExecutor(filePaths, expectedResourceFilePaths, "http://localhost:" + port + "/fhir/$extract-data", headers); } + @Test + public void testExtractEndpointConsent() throws PatientIdNotFoundException, IOException { + HttpHeaders headers = new HttpHeaders(); + + headers.add("content-type", "application/fhir+json"); + List expectedResourceFilePaths = List.of( + "src/test/resources/DataStoreIT/expectedOutput/diagnosis_basic_bundle.json" + ); + + List filePaths = List.of( + "src/test/resources/CRTDL_Parameters/Paremeters_all_fields_consent.json"); + testExecutor(filePaths, expectedResourceFilePaths, "http://localhost:" + port + "/fhir/$extract-data", headers); + } + + + + @Test public void testFlare() throws IOException { - FileInputStream fis = new FileInputStream(RESOURCE_PATH_PREFIX+"CRTDL/CRTDL_diagnosis_female.json"); + FileInputStream fis = new FileInputStream(RESOURCE_PATH_PREFIX + "CRTDL/CRTDL_diagnosis_female.json"); String jsonString = new Scanner(fis, StandardCharsets.UTF_8).useDelimiter("\\A").next(); Crtdl crtdl = objectMapper.readValue(jsonString, Crtdl.class); - - // Use the serialized JSON string in the bodyValue method and capture the response + fis.close(); String responseBody = flareClient.post() .uri("/query/execute-cohort") .contentType(MediaType.parseMediaType("application/sq+json")) @@ -104,17 +121,31 @@ public void testFlare() throws IOException { .bodyToMono(String.class) .block(); // Blocking to get the response synchronously - // Log the response body logger.debug("Response Body: {}", responseBody); - // Parse the response body as a list of patient IDs List patientIds = objectMapper.readValue(responseBody, TypeFactory.defaultInstance().constructCollectionType(List.class, String.class)); - // Count the number of patient IDs int patientCount = patientIds.size(); logger.info(String.valueOf(patientIds)); assertEquals(4, patientCount); } + @Test + public void testCql() throws IOException { + FileInputStream fis = new FileInputStream(RESOURCE_PATH_PREFIX + "CRTDL/CRTDL_diagnosis_female.json"); + String jsonString = new Scanner(fis, StandardCharsets.UTF_8).useDelimiter("\\A").next(); + Crtdl crtdl = objectMapper.readValue(jsonString, Crtdl.class); + + var ccdl = objectMapper.treeToValue(crtdl.getCohortDefinition(), StructuredQuery.class); + + Mono> patientListMono = cqlClient.getPatientListByCql(cqlQueryTranslator.toCql(ccdl).print()); + List patientList = patientListMono.block(); + + List expectedPatientList = Arrays.asList("1", "2", "4", "VHF00006"); + assertEquals(expectedPatientList.size(), patientList.size(), "Patient list size mismatch"); + assertIterableEquals(expectedPatientList, patientList, "Patient list contents mismatch"); + fis.close(); + } + @Test public void testFhirSearchCondition() throws IOException, PatientIdNotFoundException { @@ -167,11 +198,10 @@ public void testAllFields() throws IOException, PatientIdNotFoundException { } - @Test public void testMustHave() throws IOException { - FileInputStream fis = new FileInputStream(RESOURCE_PATH_PREFIX+"CRTDL/CRTDL_observation_must_have.json"); + FileInputStream fis = new FileInputStream(RESOURCE_PATH_PREFIX + "CRTDL/CRTDL_observation_must_have.json"); Crtdl crtdl = objectMapper.readValue(fis, Crtdl.class); logger.info("ResourceType {}", crtdl.getResourceType()); List patients = new ArrayList<>(); @@ -180,6 +210,7 @@ public void testMustHave() throws IOException { Map> result = collectedResourcesMono.block(); // Blocking to get the result assert result != null; Assertions.assertTrue(result.isEmpty()); + fis.close(); } @@ -220,21 +251,6 @@ public void testExecutor(List filePaths, List expectedResourceFi String fileContent = Files.readString(Paths.get(filePath), StandardCharsets.UTF_8); // Read the JSON file into a JsonNode - /* JsonNode rootNode = objectMapper.readTree(fileContent); - - // Extract the cohortDefinition object - JsonNode cohortDefinitionNode = rootNode.path("cohortDefinition"); - - // Convert the cohortDefinition object to a JSON string - String cohortDefinitionJson = objectMapper.writeValueAsString(cohortDefinitionNode); - - Crtdl crtdl = objectMapper.readValue(fileContent, Crtdl.class); - - crtdl.setSqString(cohortDefinitionJson); - - Listresult =fhirController.fetchPatientListFromFlare(crtdl).block(); - logger.info("Flare Call direct {}", result); -*/ HttpEntity entity = new HttpEntity<>(fileContent, headers); try { ResponseEntity response = restTemplate.exchange( @@ -244,7 +260,7 @@ public void testExecutor(List filePaths, List expectedResourceFi assertEquals(202, response.getStatusCode().value(), "Endpoint not accepting crtdl"); // Polling the status endpoint - pollStatusEndpoint(restTemplate, headers, "http://localhost:" + port+ Objects.requireNonNull(response.getHeaders().get("Content-Location")).getFirst()); + pollStatusEndpoint(restTemplate, headers, "http://localhost:" + port + Objects.requireNonNull(response.getHeaders().get("Content-Location")).getFirst()); } catch (HttpStatusCodeException e) { logger.error("HTTP Status code error: {}", e.getStatusCode(), e); Assertions.fail("HTTP request failed with status code: " + e.getStatusCode()); @@ -279,7 +295,7 @@ private void pollStatusEndpoint(TestRestTemplate restTemplate, HttpHeaders heade if (response.getStatusCode().value() == 200) { completed = true; assertEquals(200, response.getStatusCode().value(), "Status endpoint did not return 200"); - logger.debug("Final Response {}",response.getBody()); + logger.debug("Final Response {}", response.getBody()); } if (response.getStatusCode().is4xxClientError() || response.getStatusCode().is5xxServerError()) { logger.error("Polling status endpoint failed with status code: {}", response.getStatusCode()); @@ -309,4 +325,143 @@ private void pollStatusEndpoint(TestRestTemplate restTemplate, HttpHeaders heade } } + + @Test + public void testHandlerWithUpdate() { + List strings = new ArrayList<>(); + strings.add("VHF00006"); + + // Reading resource + Resource observation = null; + try { + //Observation with Consent outside the consent, but inside with encounter within + observation = ResourceReader.readResource("src/test/resources/InputResources/Observation/Observation_lab_vhf_00006.json"); + DateTimeType time= new DateTimeType("2020-01-01T00:00:00+01:00"); + ((Observation)observation).setEffective(time); + // Build consent information as a Flux + Flux>>> consentInfoFlux = consentHandler.buildingConsentInfo("yes-yes-yes-yes", strings); + + consentInfoFlux = consentHandler.updateConsentPeriodsByPatientEncounters(consentInfoFlux, strings); + + // Collect the Flux into a List of Maps, without altering its structure + List>>> consentInfoList = consentInfoFlux.collectList().block(); + + // Assuming you need the first element from the list + Map>> consentInfo = consentInfoList.get(0); + + // Now pass the Map (instead of the Flux) to checkConsent + Boolean consentInfoResult = consentHandler.checkConsent((DomainResource) observation, consentInfo); + + assertTrue(consentInfoResult); + + } catch (IOException e) { + throw new RuntimeException(e); + } + + + } + + + + @Test + public void testHandlerWithoutUpdate() { + List strings = new ArrayList<>(); + strings.add("VHF00006"); + + // Reading resource + Resource observation = null; + try { + //Observation with Consent outside the consent, but inside with encounter within + observation = ResourceReader.readResource("src/test/resources/InputResources/Observation/Observation_lab_vhf_00006.json"); + DateTimeType time= new DateTimeType("2022-01-01T00:00:00+01:00"); + ((Observation)observation).setEffective(time); + // Build consent information as a Flux + Flux>>> consentInfoFlux = consentHandler.buildingConsentInfo("yes-yes-yes-yes", strings); + + consentInfoFlux = consentHandler.updateConsentPeriodsByPatientEncounters(consentInfoFlux, strings); + + // Collect the Flux into a List of Maps, without altering its structure + List>>> consentInfoList = consentInfoFlux.collectList().block(); + + // Assuming you need the first element from the list + Map>> consentInfo = consentInfoList.get(0); + + // Now pass the Map (instead of the Flux) to checkConsent + Boolean consentInfoResult = consentHandler.checkConsent((DomainResource) observation, consentInfo); + + assertTrue(consentInfoResult); + + } catch (IOException e) { + throw new RuntimeException(e); + } + + + } + + @Test + public void testHandlerWithUpdatingFail() { + List strings = new ArrayList<>(); + strings.add("VHF00006"); + + // Reading resource + Resource observation = null; + try { + observation = ResourceReader.readResource("src/test/resources/InputResources/Observation/Observation_lab_vhf_00006.json"); + DateTimeType time= new DateTimeType("2026-01-01T00:00:00+01:00"); + ((Observation)observation).setEffective(time); + // Build consent information as a Flux + Flux>>> consentInfoFlux = consentHandler.buildingConsentInfo("yes-yes-yes-yes", strings); + + // Collect the Flux into a List of Maps, without altering its structure + List>>> consentInfoList = consentInfoFlux.collectList().block(); + + // Assuming you need the first element from the list + Map>> consentInfo = consentInfoList.get(0); + + // Now pass the Map (instead of the Flux) to checkConsent + Boolean consentInfoResult = consentHandler.checkConsent((DomainResource) observation, consentInfo); + + assertFalse(consentInfoResult); + + } catch (IOException e) { + throw new RuntimeException(e); + } + + + } + + + + @Test + public void testHandlerWithoutUpdatingFail() { + List strings = new ArrayList<>(); + strings.add("VHF00006"); + + // Reading resource + Resource observation = null; + try { + observation = ResourceReader.readResource("src/test/resources/InputResources/Observation/Observation_lab_vhf_00006.json"); + DateTimeType time= new DateTimeType("2020-01-01T00:00:00+01:00"); + ((Observation)observation).setEffective(time); + // Build consent information as a Flux + Flux>>> consentInfoFlux = consentHandler.buildingConsentInfo("yes-yes-yes-yes", strings); + + // Collect the Flux into a List of Maps, without altering its structure + List>>> consentInfoList = consentInfoFlux.collectList().block(); + + // Assuming you need the first element from the list + Map>> consentInfo = consentInfoList.get(0); + + // Now pass the Map (instead of the Flux) to checkConsent + Boolean consentInfoResult = consentHandler.checkConsent((DomainResource) observation, consentInfo); + + assertFalse(consentInfoResult); + + } catch (IOException e) { + throw new RuntimeException(e); + } + + + } + } diff --git a/src/test/java/de/medizininformatikinitiative/torch/RedactTest.java b/src/test/java/de/medizininformatikinitiative/torch/RedactTest.java index f67b124..9d63e0e 100644 --- a/src/test/java/de/medizininformatikinitiative/torch/RedactTest.java +++ b/src/test/java/de/medizininformatikinitiative/torch/RedactTest.java @@ -1,7 +1,7 @@ package de.medizininformatikinitiative.torch; import de.medizininformatikinitiative.torch.util.ResourceReader; -import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.DomainResource; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/src/test/java/de/medizininformatikinitiative/torch/ResourceTransformationTest.java b/src/test/java/de/medizininformatikinitiative/torch/ResourceTransformationTest.java index 61a4f53..5f45b81 100644 --- a/src/test/java/de/medizininformatikinitiative/torch/ResourceTransformationTest.java +++ b/src/test/java/de/medizininformatikinitiative/torch/ResourceTransformationTest.java @@ -1,8 +1,10 @@ package de.medizininformatikinitiative.torch; import de.medizininformatikinitiative.torch.model.Crtdl; +import de.medizininformatikinitiative.torch.util.ConsentCodeMapper; import de.medizininformatikinitiative.torch.util.ResourceReader; import de.medizininformatikinitiative.torch.util.ResultFileManager; +import de.medizininformatikinitiative.torch.service.DataStore; import org.hl7.fhir.r4.model.DomainResource; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -10,6 +12,7 @@ import org.springframework.web.reactive.function.client.WebClient; import java.io.FileInputStream; +import java.time.Clock; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -26,21 +29,24 @@ public class ResourceTransformationTest extends BaseTest { @BeforeAll void setup(){ - dataStore = new DataStore(webClient, ctx); + dataStore = new DataStore(webClient, ctx, Clock.systemDefaultZone(), 500); } @Test public void testObservation() { - ResourceTransformer transformer = new ResourceTransformer(dataStore, cds); - try (FileInputStream fis = new FileInputStream("src/test/resources/CRTDL/CRTDL_observation.json")) { + ResourceTransformer transformer = null; + try { + transformer = new ResourceTransformer(dataStore, cds, new ConsentHandler( dataStore, new ConsentCodeMapper("src/test/resources/mappings/consent-mappings.json"), "src/test/resources/mappings/profile_to_consent.json",cds )); + + FileInputStream fis = new FileInputStream("src/test/resources/CRTDL/CRTDL_observation.json"); Crtdl crtdl = objectMapper.readValue(fis, Crtdl.class); DomainResource resourcesrc = (DomainResource) ResourceReader.readResource("src/test/resources/InputResources/Observation/Observation_lab.json"); DomainResource resourceexpected = (DomainResource) ResourceReader.readResource("src/test/resources/ResourceTransformationTest/ExpectedOutput/Observation_lab.json"); DomainResource tgt = (DomainResource) transformer.transform(resourcesrc,crtdl.getDataExtraction().getAttributeGroups().getFirst()); assertNotNull(tgt); assertEquals(ctx.newJsonParser().setPrettyPrint(true).encodeResourceToString(resourceexpected), ctx.newJsonParser().setPrettyPrint(true).encodeResourceToString(tgt), " Expected not equal to actual output"); - + fis.close(); } catch (Exception e) { logger.error("",e); } diff --git a/src/test/java/de/medizininformatikinitiative/torch/config/TestConfig.java b/src/test/java/de/medizininformatikinitiative/torch/config/TestConfig.java new file mode 100644 index 0000000..a3a3ef4 --- /dev/null +++ b/src/test/java/de/medizininformatikinitiative/torch/config/TestConfig.java @@ -0,0 +1,249 @@ +package de.medizininformatikinitiative.torch.config; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.util.BundleBuilder; +import com.fasterxml.jackson.databind.ObjectMapper; +import de.medizininformatikinitiative.torch.BundleCreator; +import de.medizininformatikinitiative.torch.CdsStructureDefinitionHandler; +import de.medizininformatikinitiative.torch.ResourceTransformer; +import de.medizininformatikinitiative.torch.cql.CqlClient; +import de.medizininformatikinitiative.torch.cql.FhirConnector; +import de.medizininformatikinitiative.torch.cql.FhirHelper; +import de.medizininformatikinitiative.torch.*; +import de.medizininformatikinitiative.torch.model.mapping.DseMappingTreeBase; +import de.medizininformatikinitiative.torch.model.mapping.DseTreeRoot; +import de.medizininformatikinitiative.torch.rest.CapabilityStatementController; +import de.medizininformatikinitiative.torch.util.ConsentCodeMapper; +import de.medizininformatikinitiative.torch.service.DataStore; +import de.medizininformatikinitiative.torch.util.ElementCopier; +import de.medizininformatikinitiative.torch.util.Redaction; +import de.medizininformatikinitiative.torch.util.ResultFileManager; +import de.numcodex.sq2cql.Translator; +import de.numcodex.sq2cql.model.Mapping; +import de.numcodex.sq2cql.model.MappingContext; +import de.numcodex.sq2cql.model.MappingTreeBase; +import de.numcodex.sq2cql.model.MappingTreeModuleRoot; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; +import org.springframework.context.annotation.Profile; +import org.springframework.http.client.reactive.ReactorClientHttpConnector; +import org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager; +import org.springframework.security.oauth2.client.InMemoryReactiveOAuth2AuthorizedClientService; +import org.springframework.security.oauth2.client.registration.ClientRegistrations; +import org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository; +import org.springframework.security.oauth2.client.web.reactive.function.client.ServerOAuth2AuthorizedClientExchangeFilterFunction; +import org.springframework.web.reactive.function.client.ExchangeFilterFunction; +import org.springframework.web.reactive.function.client.ExchangeFilterFunctions; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.netty.http.client.HttpClient; +import reactor.netty.resources.ConnectionProvider; + +import java.io.File; +import java.io.IOException; +import java.time.Clock; +import java.util.Arrays; +import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static java.util.Map.entry; +import static org.springframework.security.oauth2.core.AuthorizationGrantType.CLIENT_CREDENTIALS; +import static org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames.REGISTRATION_ID; + +@Configuration +@Profile("test") +public class TestConfig { + private static final Logger logger = LoggerFactory.getLogger(TestConfig.class); + + @Value("${torch.mappingsFile}") + private String mappingsFile; + @Value("${torch.conceptTreeFile}") + private String conceptTreeFile; + @Value("${torch.dseMappingTreeFile}") + private String dseMappingTreeFile; + + + @Bean + public ObjectMapper objectMapper() { + return new ObjectMapper(); + } + + @Bean + @Qualifier("fhirClient") + public WebClient fhirWebClient(@Value("${torch.fhir.url}") String baseUrl) { + logger.info("Initializing FHIR WebClient with URL: {}", baseUrl); + + ConnectionProvider provider = ConnectionProvider.builder("data-store") + .maxConnections(4) + .pendingAcquireMaxCount(500) + .build(); + HttpClient httpClient = HttpClient.create(provider); + WebClient.Builder builder = WebClient.builder() + .baseUrl(baseUrl) + .clientConnector(new ReactorClientHttpConnector(httpClient)) + .defaultHeader("Accept", "application/fhir+json"); + + + + return builder.build(); + } + + @Bean + @Qualifier("flareClient") + public WebClient flareWebClient(@Value("${torch.flare.url}") String baseUrl) { + logger.info("Initializing Flare WebClient with URL: {}", baseUrl); + + ConnectionProvider provider = ConnectionProvider.builder("data-store") + .maxConnections(4) + .pendingAcquireMaxCount(500) + .build(); + HttpClient httpClient = HttpClient.create(provider); + WebClient.Builder builder = WebClient.builder() + .baseUrl(baseUrl) + .clientConnector(new ReactorClientHttpConnector(httpClient)) + .defaultHeader("Accept", "application/sq+json"); + + return builder.build(); + } + + @Bean + public ConsentCodeMapper consentCodeMapper( @Value("${torch.mapping.consent}") String consentFilePath) throws IOException { + return new ConsentCodeMapper(consentFilePath); + } + + @Bean + public DataStore dataStore(@Qualifier("fhirClient") WebClient client, FhirContext context, @Qualifier("systemDefaultZone") Clock clock, + @Value("${torch.fhir.pageCount}") int pageCount) { + return new DataStore(client, context, clock, pageCount); + } + + @Bean + public DseMappingTreeBase dseMappingTreeBase(ObjectMapper jsonUtil) throws IOException { + return new DseMappingTreeBase(Arrays.stream(jsonUtil.readValue(new File(dseMappingTreeFile), DseTreeRoot[].class)).toList()); + } + + @Lazy + @Bean + Translator createCqlTranslator( ObjectMapper jsonUtil) throws IOException { + var mappings = jsonUtil.readValue(new File(mappingsFile), Mapping[].class); + var mappingTreeBase = new MappingTreeBase(Arrays.stream(jsonUtil.readValue(new File(conceptTreeFile), MappingTreeModuleRoot[].class)).toList()); + + return Translator.of(MappingContext.of( + Stream.of(mappings) + .collect(Collectors.toMap(Mapping::key, Function.identity(), (a, b) -> a)), + mappingTreeBase, + Map.ofEntries(entry("http://fhir.de/CodeSystem/bfarm/icd-10-gm", "icd10"), + entry("mii.abide", "abide"), + entry("http://fhir.de/CodeSystem/bfarm/ops", "ops"), + entry("http://dicom.nema.org/resources/ontology/DCM", "dcm"), + entry("https://www.medizininformatik-initiative.de/fhir/core/modul-person/CodeSystem/Vitalstatus", "vitalstatus"), + entry("http://loinc.org", "loinc"), + entry("https://fhir.bbmri.de/CodeSystem/SampleMaterialType", "sample"), + entry("http://fhir.de/CodeSystem/bfarm/atc", "atc"), + entry("http://snomed.info/sct", "snomed"), + entry("http://terminology.hl7.org/CodeSystem/condition-ver-status", "cvs"), + entry("http://hl7.org/fhir/administrative-gender", "gender"), + entry("urn:oid:1.2.276.0.76.5.409", "urn409"), + entry( + "https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/ecrf-parameter-codes", + "numecrf"), + entry("urn:iso:std:iso:3166", "iso3166"), + entry("https://www.netzwerk-universitaetsmedizin.de/fhir/CodeSystem/frailty-score", + "frailtyscore"), + entry("http://terminology.hl7.org/CodeSystem/consentcategorycodes", "consentcategory"), + entry("urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", "consent"), + entry("http://hl7.org/fhir/sid/icd-o-3", "icdo3"), + entry("http://hl7.org/fhir/consent-provision-type", "provisiontype")))); + } + + + @Bean + FhirConnector createFhirConnector(@Value("${torch.fhir.url}") String fhirUrl) { + return new FhirConnector(fhirContext().newRestfulGenericClient(fhirUrl)); + } + + @Bean + FhirHelper createFhirHelper(FhirContext fhirContext) { + return new FhirHelper(fhirContext); + } + + @Bean + CqlClient createCqlQueryClient( + FhirHelper fhirHelper, + DataStore dataStore) { + + return new CqlClient( fhirHelper, dataStore); + } + + @Bean + public ElementCopier elementCopier(CdsStructureDefinitionHandler cds) { + return new ElementCopier(cds); + } + + @Bean + public BundleBuilder bundleBuilder(FhirContext context) { + return new BundleBuilder(context); + } + + @Bean + public Redaction redaction(CdsStructureDefinitionHandler cds) { + return new Redaction(cds); + } + + @Bean + public ResourceTransformer resourceTransformer(DataStore dataStore, CdsStructureDefinitionHandler cds, ConsentHandler handler) { + return new ResourceTransformer(dataStore, cds, handler); + } + + @Bean + ConsentHandler handler(DataStore dataStore, CdsStructureDefinitionHandler cds, ConsentCodeMapper mapper, @Value("${torch.mapping.consent_to_profile}") String consentFilePath) throws IOException { + return new ConsentHandler(dataStore, mapper,consentFilePath,cds); + } + + @Bean + public FhirContext fhirContext() { + return FhirContext.forR4(); // Assuming R4 version, configure as needed + } + + @Bean + public CdsStructureDefinitionHandler cdsStructureDefinitionHandler(FhirContext fhirContext, @Value("${torch.profile.dir}") String dir) { + return new CdsStructureDefinitionHandler(dir); + } + + @Bean + public ResultFileManager resultFileManager(@Value("${torch.results.dir}") String resultsDir, @Value("${torch.results.persistence}") String duration, FhirContext fhirContext, @Value("${nginx.servername}") String hostname, @Value("${nginx.filelocation}") String fileserverName) { + return new ResultFileManager(resultsDir, duration, fhirContext, hostname, fileserverName); + } + + @Bean + public CapabilityStatementController capabilityStatementController() { + return new CapabilityStatementController(); + } + + @Bean + public BundleCreator bundleCreator() { + return new BundleCreator(); + } + + + @Bean + ExecutorService executorService() { + return Executors.newCachedThreadPool(); + } + + @Bean + public Clock systemDefaultZone() { + return Clock.systemDefaultZone(); + } + + + +} diff --git a/src/test/java/de/medizininformatikinitiative/torch/model/FilterTest.java b/src/test/java/de/medizininformatikinitiative/torch/model/FilterTest.java new file mode 100644 index 0000000..b34a114 --- /dev/null +++ b/src/test/java/de/medizininformatikinitiative/torch/model/FilterTest.java @@ -0,0 +1,83 @@ +package de.medizininformatikinitiative.torch.model; + +import de.medizininformatikinitiative.torch.config.SpringContext; +import de.medizininformatikinitiative.torch.model.mapping.DseMappingTreeBase; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.MockedStatic; +import org.mockito.Mockito; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.util.List; +import java.util.stream.Stream; + +import static org.mockito.Mockito.when; +import static org.assertj.core.api.Assertions.assertThat; + +@ExtendWith(MockitoExtension.class) +class FilterTest { + static final String FILTER_TYPE_TOKEN = "token"; + static final String NAME = "name-164612"; + static final String SYSTEM_A = "system-a"; + static final String SYSTEM_B = "system-b"; + static final String CODE_A_NO_CHILDREN = "code-no-children-a"; + static final String CODE_B_NO_CHILDREN = "code-no-children-b"; + static final String CODE_A_TWO_CHILDREN = "code-a-two-children"; + static final String CODE_A_CHILD_1 = "code-a-child-1"; + static final String CODE_A_CHILD_2 = "code-a-child-2"; + + @Mock + DseMappingTreeBase mappingTreeBase; + MockedStatic mockedSpringContext; + + @BeforeEach + public void setup() { + mockedSpringContext = Mockito.mockStatic(SpringContext.class); + mockedSpringContext.when(SpringContext::getDseMappingTreeBase).thenReturn(mappingTreeBase); + } + + @AfterEach + public void close() { + mockedSpringContext.close(); + } + + @Test + void testOneCodeNoChildren() { + when(mappingTreeBase.expand(SYSTEM_A, CODE_A_NO_CHILDREN)).thenReturn(Stream.of(CODE_A_NO_CHILDREN)); + + Code code = new Code(SYSTEM_A, CODE_A_NO_CHILDREN); + Filter filter = new Filter(FILTER_TYPE_TOKEN, NAME, List.of(code)); + + var result = filter.getCodeFilter(); + + assertThat(result).isEqualTo("name-164612=system-a%7Ccode-no-children-a"); + } + + @Test + void testTwoCodesNoChildren() { + when(mappingTreeBase.expand(SYSTEM_A, CODE_A_NO_CHILDREN)).thenReturn(Stream.of(CODE_A_NO_CHILDREN)); + when(mappingTreeBase.expand(SYSTEM_B, CODE_B_NO_CHILDREN)).thenReturn(Stream.of(CODE_B_NO_CHILDREN)); + + Code codeA = new Code(SYSTEM_A, CODE_A_NO_CHILDREN); + Code codeB = new Code(SYSTEM_B, CODE_B_NO_CHILDREN); + Filter filter = new Filter(FILTER_TYPE_TOKEN, NAME, List.of(codeA, codeB)); + + var result = filter.getCodeFilter(); + + assertThat(result).isEqualTo("name-164612=system-a%7Ccode-no-children-a,system-b%7Ccode-no-children-b"); + } + @Test + void testOneCodeTwoChildren() { + when(mappingTreeBase.expand(SYSTEM_A, CODE_A_TWO_CHILDREN)).thenReturn(Stream.of(CODE_A_TWO_CHILDREN, CODE_A_CHILD_1, CODE_A_CHILD_2)); + + Code code = new Code(SYSTEM_A, CODE_A_TWO_CHILDREN); + Filter filter = new Filter(FILTER_TYPE_TOKEN, NAME, List.of(code)); + + var result = filter.getCodeFilter(); + + assertThat(result).isEqualTo("name-164612=system-a%7Ccode-a-two-children,system-a%7Ccode-a-child-1,system-a%7Ccode-a-child-2"); + } +} diff --git a/src/test/resources/BlazeBundle.json b/src/test/resources/BlazeBundle.json index 9377489..4e31eca 100644 --- a/src/test/resources/BlazeBundle.json +++ b/src/test/resources/BlazeBundle.json @@ -110,7 +110,7 @@ "reference": "Patient/VHF00006" }, "period": { - "start": "2021-01-01T00:00:00+01:00", + "start": "2019-01-01T00:00:00+01:00", "end": "2021-01-02T00:00:00+01:00" }, "diagnosis": [ @@ -134,6 +134,234 @@ "method": "PUT", "url": "Encounter/VHF00006-E-1" } + }, + { + "fullUrl": "Consent/VHF00006-CO-1", + "resource": { + "patient": { + "reference": "Patient/VHF00006" + }, + "category": [ + { + "coding": [ + { + "system": "http://loinc.org", + "code": "59284-0" + } + ] + } + ], + "provision": { + "provision": [ + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + } + + ], + "type": "deny", + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2050-12-31T00:00:00+01:00" + } + }, + "meta": { + "versionId": "6", + "lastUpdated": "2024-09-27T09:01:54.858Z", + "profile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Consent", + "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-einwilligung" + ] + }, + "resourceType": "Consent", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "research" + } + ] + }, + "policy": [ + { + "uri": "https://www.medizininformatik-initiative.de/sites/default/files/2020-04/MII_AG-Consent_Einheitlicher-Mustertext_v1.6d.pdf" + } + ], + "dateTime": "2021-01-01T00:00:00+01:00", + "status": "active", + "id": "VHF00006-CO-1" + }, "request": { + "method": "PUT", + "url": "Consent/VHF00006-CO-1" + } + + }, { "fullUrl": "Encounter/VHF00006-E-1-A-1", @@ -265,7 +493,7 @@ "encounter": { "reference": "Encounter/VHF00006-E-1" }, - "effectiveDateTime": "2021-01-01T00:00:00+01:00", + "effectiveDateTime": "2022-01-01T00:00:00+01:00", "valueQuantity": { "value": 27.4, "unit": "picogram per milliliter", @@ -306,156 +534,13 @@ "subject": { "reference": "Patient/VHF00006" }, - "recordedDate": "2021-01-01T00:00:00+01:00" + "recordedDate": "2022-01-01T00:00:00+01:00" }, "request": { "method": "PUT", "url": "Condition/VHF00006-CD-1" } }, - { - "fullUrl": "Consent/VHF00006-CO-1", - "resource": { - "resourceType": "Consent", - "id": "VHF00006-CO-1", - "meta": { - "profile": [ - "http://fhir.de/ConsentManagement/StructureDefinition/Consent" - ] - }, - "status": "active", - "scope": { - "coding": [ - { - "system": "http://terminology.hl7.org/CodeSystem/consentscope", - "code": "research" - } - ] - }, - "category": [ - { - "coding": [ - { - "system": "http://loinc.org", - "code": "59284-0" - } - ] - } - ], - "patient": { - "reference": "Patient/VHF00006" - }, - "dateTime": "2021-01-01T00:00:00+01:00", - "policy": [ - { - "uri": "https://www.medizininformatik-initiative.de/sites/default/files/2020-04/MII_AG-Consent_Einheitlicher-Mustertext_v1.6d.pdf" - } - ], - "provision": { - "type": "deny", - "period": { - "start": "2021-01-01T00:00:00+01:00", - "end": "2050-12-31T00:00:00+01:00" - }, - "provision": [ - { - "type": "permit", - "period": { - "start": "2021-01-01T00:00:00+01:00", - "end": "2025-12-31T00:00:00+01:00" - }, - "code": [ - { - "coding": [ - { - "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", - "code": "2.16.840.1.113883.3.1937.777.24.5.3.15", - "display": "KKDAT_5J_pro_uebertragen" - } - ] - } - ] - }, - { - "type": "permit", - "period": { - "start": "2021-01-01T00:00:00+01:00", - "end": "2050-12-31T00:00:00+01:00" - }, - "code": [ - { - "coding": [ - { - "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", - "code": "2.16.840.1.113883.3.1937.777.24.5.3.16", - "display": "KKDAT_5J_pro_speichern_verarbeiten" - } - ] - } - ] - }, - { - "type": "permit", - "period": { - "start": "2021-01-01T00:00:00+01:00", - "end": "2050-12-31T00:00:00+01:00" - }, - "code": [ - { - "coding": [ - { - "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", - "code": "2.16.840.1.113883.3.1937.777.24.5.3.17", - "display": "KKDAT_5J_pro_wissenschaftlich_nutzen" - } - ] - } - ] - }, - { - "type": "permit", - "period": { - "start": "2021-01-01T00:00:00+01:00", - "end": "2025-12-31T00:00:00+01:00" - }, - "code": [ - { - "coding": [ - { - "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", - "code": "2.16.840.1.113883.3.1937.777.24.5.3.39", - "display": "KKDAT_5J_pro_uebertragen_KVNR" - } - ] - } - ] - }, - { - "type": "permit", - "period": { - "start": "2021-01-01T00:00:00+01:00", - "end": "2025-12-31T00:00:00+01:00" - }, - "code": [ - { - "coding": [ - { - "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", - "code": "2.16.840.1.113883.3.1937.777.24.5.3.25", - "display": "BIOMAT_Zusatzmengen_entnehmen" - } - ] - } - ] - } - ] - } - }, - "request": { - "method": "PUT", - "url": "Consent/VHF00006-CO-1" - } - }, { "resource": { "resourceType": "Observation", @@ -851,7 +936,7 @@ "coding": [ { "system": "http://snomed.info/sct", - "code": "789012", + "code": "45252009", "display": "Example diagnosis 3" } ] @@ -957,6 +1042,233 @@ "method": "PUT", "url": "Patient/4" } + }, { + "fullUrl": "Consent/4-CO-1", + "resource": { + "patient": { + "reference": "Patient/4" + }, + "category": [ + { + "coding": [ + { + "system": "http://loinc.org", + "code": "59284-0" + } + ] + } + ], + "provision": { + "provision": [ + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30" + } + ] + } + ], + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2030-12-31T00:00:00+01:00" + } + } + + ], + "type": "deny", + "period": { + "start": "2019-01-01T00:00:00+01:00", + "end": "2050-12-31T00:00:00+01:00" + } + }, + "meta": { + "versionId": "6", + "lastUpdated": "2024-09-27T09:01:54.858Z", + "profile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Consent", + "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-einwilligung" + ] + }, + "resourceType": "Consent", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "research" + } + ] + }, + "policy": [ + { + "uri": "https://www.medizininformatik-initiative.de/sites/default/files/2020-04/MII_AG-Consent_Einheitlicher-Mustertext_v1.6d.pdf" + } + ], + "dateTime": "2019-01-01T00:00:00+01:00", + "status": "active", + "id": "4-CO-1" + }, "request": { + "method": "PUT", + "url": "Consent/4-CO-1" + } + + }, { "resource": { diff --git a/src/test/resources/CRTDL/CRTDL_all_fields_consent.json b/src/test/resources/CRTDL/CRTDL_all_fields_consent.json new file mode 100644 index 0000000..a7fcbda --- /dev/null +++ b/src/test/resources/CRTDL/CRTDL_all_fields_consent.json @@ -0,0 +1,7324 @@ +{ + "version": "http://json-schema.org/to-be-done/schema#", + "display": "", + "cohortDefinition": { + "version": "http://to_be_decided.com/draft-1/schema#", + "display": "", + "inclusionCriteria": [ + [ + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds", + "version": "1.0.0" + }, + "termCodes": [ + { + "code": "yes-yes-no-yes", + "display": "Verteilte, EU-DSGVO konforme Analyse, ohne Krankenassendaten, und mit Rekontaktierung", + "system": "fdpg.consent.combined" + } + ] + } + ] + ] + }, + "dataExtraction": { + "attributeGroups": [ + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationStatement", + "attributes": [ + { + "attributeRef": "MedicationStatement.identifier", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.basedOn", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.partOf", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.status", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.category", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.medication[x]", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.context", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.effective[x]", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.dateAsserted", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.informationSource", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.reasonCode", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.reasonReference", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.note", + "mustHave": false + }, + { + "attributeRef": "MedicationStatement.dosage", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/medikationsliste", + "attributes": [ + { + "attributeRef": "List.identifier", + "mustHave": false + }, + { + "attributeRef": "List.status", + "mustHave": false + }, + { + "attributeRef": "List.mode", + "mustHave": false + }, + { + "attributeRef": "List.code", + "mustHave": false + }, + { + "attributeRef": "List.encounter", + "mustHave": false + }, + { + "attributeRef": "List.date", + "mustHave": false + }, + { + "attributeRef": "List.entry", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationRequest", + "attributes": [ + { + "attributeRef": "MedicationRequest.identifier", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.status", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.intent", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.medication[x]", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.encounter", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.authoredOn", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.requester", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.recorder", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.reasonCode", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.reasonReference", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.basedOn", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.note", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.dosageInstruction", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.substitution", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.priorPrescription", + "mustHave": false + }, + { + "attributeRef": "MedicationRequest.detectedIssue", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/Medication", + "attributes": [ + { + "attributeRef": "Medication.code", + "mustHave": false + }, + { + "attributeRef": "Medication.form", + "mustHave": false + }, + { + "attributeRef": "Medication.ingredient", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationAdministration", + "attributes": [ + { + "attributeRef": "MedicationAdministration.identifier", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.partOf", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.status", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.category", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.medication[x]", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.context", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.effective[x]", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.performer", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.reasonCode", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.reasonReference", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.request", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.note", + "mustHave": false + }, + { + "attributeRef": "MedicationAdministration.dosage", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-provenance", + "attributes": [ + { + "attributeRef": "Provenance.target", + "mustHave": false + }, + { + "attributeRef": "Provenance.recorded", + "mustHave": false + }, + { + "attributeRef": "Provenance.agent", + "mustHave": false + }, + { + "attributeRef": "Provenance.entity", + "mustHave": false + }, + { + "attributeRef": "Provenance.signature", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-einwilligung", + "attributes": [ + { + "attributeRef": "Consent.extension:domainReference", + "mustHave": false + }, + { + "attributeRef": "Consent.status", + "mustHave": false + }, + { + "attributeRef": "Consent.category", + "mustHave": false + }, + { + "attributeRef": "Consent.patient", + "mustHave": false + }, + { + "attributeRef": "Consent.dateTime", + "mustHave": false + }, + { + "attributeRef": "Consent.organization", + "mustHave": false + }, + { + "attributeRef": "Consent.source[x]", + "mustHave": false + }, + { + "attributeRef": "Consent.policy", + "mustHave": false + }, + { + "attributeRef": "Consent.policyRule", + "mustHave": false + }, + { + "attributeRef": "Consent.provision", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-documentreference", + "attributes": [ + { + "attributeRef": "DocumentReference.status", + "mustHave": false + }, + { + "attributeRef": "DocumentReference.content", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Substance", + "attributes": [ + { + "attributeRef": "Substance.category", + "mustHave": false + }, + { + "attributeRef": "Substance.code", + "mustHave": false + }, + { + "attributeRef": "Substance.ingredient", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Organization", + "attributes": [ + { + "attributeRef": "Organization.extension:beschreibung", + "mustHave": false + }, + { + "attributeRef": "Organization.identifier", + "mustHave": false + }, + { + "attributeRef": "Organization.type", + "mustHave": false + }, + { + "attributeRef": "Organization.name", + "mustHave": false + }, + { + "attributeRef": "Organization.alias", + "mustHave": false + }, + { + "attributeRef": "Organization.partOf", + "mustHave": false + }, + { + "attributeRef": "Organization.contact", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Specimen", + "attributes": [ + { + "attributeRef": "Specimen.extension:festgestellteDiagnose", + "mustHave": false + }, + { + "attributeRef": "Specimen.extension:gehoertZu", + "mustHave": false + }, + { + "attributeRef": "Specimen.identifier", + "mustHave": false + }, + { + "attributeRef": "Specimen.status", + "mustHave": false + }, + { + "attributeRef": "Specimen.type", + "mustHave": false + }, + { + "attributeRef": "Specimen.parent", + "mustHave": false + }, + { + "attributeRef": "Specimen.request", + "mustHave": false + }, + { + "attributeRef": "Specimen.collection", + "mustHave": false + }, + { + "attributeRef": "Specimen.processing", + "mustHave": false + }, + { + "attributeRef": "Specimen.container", + "mustHave": false + }, + { + "attributeRef": "Specimen.note", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/SpecimenCore", + "attributes": [ + { + "attributeRef": "Specimen.identifier", + "mustHave": false + }, + { + "attributeRef": "Specimen.status", + "mustHave": false + }, + { + "attributeRef": "Specimen.type", + "mustHave": false + }, + { + "attributeRef": "Specimen.parent", + "mustHave": false + }, + { + "attributeRef": "Specimen.request", + "mustHave": false + }, + { + "attributeRef": "Specimen.collection", + "mustHave": false + }, + { + "attributeRef": "Specimen.processing", + "mustHave": false + }, + { + "attributeRef": "Specimen.container", + "mustHave": false + }, + { + "attributeRef": "Specimen.note", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure", + "attributes": [ + { + "attributeRef": "Procedure.extension:Dokumentationsdatum", + "mustHave": false + }, + { + "attributeRef": "Procedure.extension:durchfuehrungsabsicht", + "mustHave": false + }, + { + "attributeRef": "Procedure.status", + "mustHave": false + }, + { + "attributeRef": "Procedure.category", + "mustHave": false + }, + { + "attributeRef": "Procedure.code", + "mustHave": false + }, + { + "attributeRef": "Procedure.performed[x]", + "mustHave": false + }, + { + "attributeRef": "Procedure.bodySite", + "mustHave": false + }, + { + "attributeRef": "Procedure.note", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Vitalstatus", + "attributes": [ + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.note", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/PatientPseudonymisiert", + "attributes": [ + { + "attributeRef": "Patient.identifier", + "mustHave": false + }, + { + "attributeRef": "Patient.gender", + "mustHave": false + }, + { + "attributeRef": "Patient.birthDate", + "mustHave": false + }, + { + "attributeRef": "Patient.deceased[x]", + "mustHave": false + }, + { + "attributeRef": "Patient.address", + "mustHave": false + }, + { + "attributeRef": "Patient.link", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/ResearchSubject", + "attributes": [ + { + "attributeRef": "ResearchSubject.identifier", + "mustHave": false + }, + { + "attributeRef": "ResearchSubject.status", + "mustHave": false + }, + { + "attributeRef": "ResearchSubject.period", + "mustHave": false + }, + { + "attributeRef": "ResearchSubject.study", + "mustHave": false + }, + { + "attributeRef": "ResearchSubject.individual", + "mustHave": false + }, + { + "attributeRef": "ResearchSubject.consent", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Patient", + "attributes": [ + { + "attributeRef": "Patient.identifier", + "mustHave": false + }, + { + "attributeRef": "Patient.name", + "mustHave": false + }, + { + "attributeRef": "Patient.gender", + "mustHave": false + }, + { + "attributeRef": "Patient.birthDate", + "mustHave": false + }, + { + "attributeRef": "Patient.deceased[x]", + "mustHave": false + }, + { + "attributeRef": "Patient.address", + "mustHave": false + }, + { + "attributeRef": "Patient.link", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Todesursache", + "attributes": [ + { + "attributeRef": "Condition.clinicalStatus", + "mustHave": false + }, + { + "attributeRef": "Condition.verificationStatus", + "mustHave": false + }, + { + "attributeRef": "Condition.category", + "mustHave": false + }, + { + "attributeRef": "Condition.code", + "mustHave": false + }, + { + "attributeRef": "Condition.encounter", + "mustHave": false + }, + { + "attributeRef": "Condition.recordedDate", + "mustHave": false + }, + { + "attributeRef": "Condition.note", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-diagnose/StructureDefinition/Diagnose", + "attributes": [ + { + "attributeRef": "Condition.extension:ReferenzPrimaerdiagnose", + "mustHave": false + }, + { + "attributeRef": "Condition.extension:Feststellungsdatum", + "mustHave": false + }, + { + "attributeRef": "Condition.clinicalStatus", + "mustHave": false + }, + { + "attributeRef": "Condition.code", + "mustHave": false + }, + { + "attributeRef": "Condition.bodySite", + "mustHave": false + }, + { + "attributeRef": "Condition.encounter", + "mustHave": false + }, + { + "attributeRef": "Condition.onset[x]", + "mustHave": false + }, + { + "attributeRef": "Condition.recordedDate", + "mustHave": false + }, + { + "attributeRef": "Condition.note", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung", + "attributes": [ + { + "attributeRef": "Encounter.extension:Aufnahmegrund", + "mustHave": false + }, + { + "attributeRef": "Encounter.identifier", + "mustHave": false + }, + { + "attributeRef": "Encounter.status", + "mustHave": false + }, + { + "attributeRef": "Encounter.class", + "mustHave": false + }, + { + "attributeRef": "Encounter.type", + "mustHave": false + }, + { + "attributeRef": "Encounter.serviceType", + "mustHave": false + }, + { + "attributeRef": "Encounter.period", + "mustHave": false + }, + { + "attributeRef": "Encounter.diagnosis", + "mustHave": false + }, + { + "attributeRef": "Encounter.hospitalization", + "mustHave": false + }, + { + "attributeRef": "Encounter.location", + "mustHave": false + }, + { + "attributeRef": "Encounter.serviceProvider", + "mustHave": false + }, + { + "attributeRef": "Encounter.partOf", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/devicemetric-eingestellte-gemessene-parameter-beatmung", + "attributes": [ + { + "attributeRef": "DeviceMetric.type", + "mustHave": false + }, + { + "attributeRef": "DeviceMetric.source", + "mustHave": false + }, + { + "attributeRef": "DeviceMetric.category", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-herzzeitvolumen-durch-indikatorverduennung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.method", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-blut-preduktal-durch-pulsoxymetrie", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/maximaler-beatmungsdruck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungszeit-hohem-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-brust", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemzugvolumen-einstellung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumenindex", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/einstellung-einatmungszeit-beatmung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-nasal", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorischer-gasfluss", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontane-atemfrequenz-beatmet", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-herzindex", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/mittlerer-beatmungsdruck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemwegsdruck-bei-mittlerem-expiratorischem-gasfluss", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/venoeser-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/zeitverhaeltnis-ein-ausatmung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/substituatvolumen", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalarterieller-wedge-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-arteriellen-blut-durch-pulsoxymetrie", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontanes-atemzugvolumen", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-generisch", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-blut-postduktal-durch-pulsoxymetrie", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungszeit-niedrigem-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-herzindex-durch-indikatorverduennung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-rektal", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-schlagvolumenindex-durch-indikatorverduennung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sonstige-pulsatile-druecke-generisch", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.method", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-vaginal", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-lendenwirbelsaeule", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffgasfluss", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-trommelfell", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-unter-der-zunge", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dauer-extrakorporaler-gasaustausch", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemzugvolumen-waehrend-beatmung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/herzfrequenz", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/eingestellter-inspiratorischer-gasfluss", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/druckdifferenz-beatmung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/systemischer-vaskulaerer-widerstandsindex", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutfluss-extrakorporaler-gasaustausch", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/puls", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/icu-device", + "attributes": [ + { + "attributeRef": "Device.identifier", + "mustHave": false + }, + { + "attributeRef": "Device.status", + "mustHave": false + }, + { + "attributeRef": "Device.deviceName", + "mustHave": false + }, + { + "attributeRef": "Device.type", + "mustHave": false + }, + { + "attributeRef": "Device.version", + "mustHave": false + }, + { + "attributeRef": "Device.property", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/haemodialyse-blutfluss", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/parameter-von-extrakorporalen-verfahren", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/endexpiratorischer-kohlendioxidpartialdruck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumen-durch-indikatorverduennung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorische-sauerstofffraktion-gemessen", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungsvolumen-pro-minute-maschineller-beatmung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-leiste", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-nasen-rachen-raum", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/herzzeitvolumen", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-speiseroehre", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontane-mechanische-atemfrequenz-beatmet", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-stirn", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/intrakranieller-druck-icp", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorische-sauerstofffraktion-eingestellt", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-achsel", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergewicht-percentil-altersabhaengig", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-halswirbelsaeule", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/horowitz-in-arteriellem-blut", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/zentralvenoeser-blutdruck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/ideales-koerpergewicht", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksatrialer-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.method", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/rechtsatrialer-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.method", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutfluss-cardiovasculaeres-geraet", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/exspiratorischer-gasfluss", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-kern", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/mechanische-atemfrequenz-beatmet", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergroesse-percentil", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/rechtsventrikulaerer-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.method", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-atemwege", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-blut", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/ionisiertes-kalzium-nierenersatzverfahren", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/monitoring-und-vitaldaten", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/parameter-von-beatmung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/exspiratorischer-sauerstoffpartialdruck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/einstellung-ausatmungszeit-beatmung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalvaskulaerer-widerstandsindex", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/devicemetric-eingestellte-gemessene-parameter-extrakorporale-verfahren", + "attributes": [ + { + "attributeRef": "DeviceMetric.type", + "mustHave": false + }, + { + "attributeRef": "DeviceMetric.source", + "mustHave": false + }, + { + "attributeRef": "DeviceMetric.category", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-brustwirbelsaeule", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemwegsdruck-bei-null-expiratorischem-gasfluss", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalarterieller-blutdruck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.method", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-harnblase", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/positiv-endexpiratorischer-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dauer-haemodialysesitzung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/arterieller-druck", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutflussindex-extrakorporaler-gasaustausch", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumen", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.bodySite", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontanes-mechanisches-atemzugvolumen-waehrend-beatmung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/substituatfluss", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/unterstuetzungsdruck-beatmung", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.partOf", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/genotyp", + "attributes": [ + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.derivedFrom", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/medikationsempfehlung", + "attributes": [ + { + "attributeRef": "Task.status", + "mustHave": false + }, + { + "attributeRef": "Task.intent", + "mustHave": false + }, + { + "attributeRef": "Task.code", + "mustHave": false + }, + { + "attributeRef": "Task.for", + "mustHave": false + }, + { + "attributeRef": "Task.encounter", + "mustHave": false + }, + { + "attributeRef": "Task.reasonCode", + "mustHave": false + }, + { + "attributeRef": "Task.reasonReference", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/empfohlene-folgemassnahme", + "attributes": [ + { + "attributeRef": "Task.status", + "mustHave": false + }, + { + "attributeRef": "Task.intent", + "mustHave": false + }, + { + "attributeRef": "Task.code", + "mustHave": false + }, + { + "attributeRef": "Task.for", + "mustHave": false + }, + { + "attributeRef": "Task.encounter", + "mustHave": false + }, + { + "attributeRef": "Task.reasonCode", + "mustHave": false + }, + { + "attributeRef": "Task.reasonReference", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/familienanamnese", + "attributes": [ + { + "attributeRef": "FamilyMemberHistory.status", + "mustHave": false + }, + { + "attributeRef": "FamilyMemberHistory.patient", + "mustHave": false + }, + { + "attributeRef": "FamilyMemberHistory.date", + "mustHave": false + }, + { + "attributeRef": "FamilyMemberHistory.relationship", + "mustHave": false + }, + { + "attributeRef": "FamilyMemberHistory.sex", + "mustHave": false + }, + { + "attributeRef": "FamilyMemberHistory.reasonCode", + "mustHave": false + }, + { + "attributeRef": "FamilyMemberHistory.reasonReference", + "mustHave": false + }, + { + "attributeRef": "FamilyMemberHistory.condition", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/ergebnis-zusammenfassung", + "attributes": [ + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.component:conclusion-string", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/molekulargenetischer-befundbericht", + "attributes": [ + { + "attributeRef": "DiagnosticReport.extension:genomics-artifact", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.extension:genomics-file", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.extension:recommended-action", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.extension:genomics-risk-assessment", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.extension:coded-note", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.extension:supporting-info", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.status", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.encounter", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.issued", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.performer", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.resultsInterpreter", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.specimen", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.result", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.media", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.conclusion", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.conclusionCode", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/diagnostische-implikation", + "attributes": [ + { + "attributeRef": "Observation.extension:related-artifact", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.derivedFrom", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/anforderung-genetischer-test", + "attributes": [ + { + "attributeRef": "ServiceRequest.basedOn", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.code", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.encounter", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.authoredOn", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.requester", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.reasonCode", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.reasonReference", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.supportingInfo", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.note", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/mikrosatelliteninstabilitaet", + "attributes": [ + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.component:conclusion-string", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/mutationslast", + "attributes": [ + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.specimen", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/variante", + "attributes": [ + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.method", + "mustHave": false + }, + { + "attributeRef": "Observation.specimen", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.component:conclusion-string", + "mustHave": false + }, + { + "attributeRef": "Observation.component:gene-studied", + "mustHave": false + }, + { + "attributeRef": "Observation.component:cytogenetic-location", + "mustHave": false + }, + { + "attributeRef": "Observation.component:reference-sequence-assembly", + "mustHave": false + }, + { + "attributeRef": "Observation.component:coding-hgvs", + "mustHave": false + }, + { + "attributeRef": "Observation.component:genomic-hgvs", + "mustHave": false + }, + { + "attributeRef": "Observation.component:genomic-ref-seq", + "mustHave": false + }, + { + "attributeRef": "Observation.component:transcript-ref-seq", + "mustHave": false + }, + { + "attributeRef": "Observation.component:exact-start-end", + "mustHave": false + }, + { + "attributeRef": "Observation.component:inner-start-end", + "mustHave": false + }, + { + "attributeRef": "Observation.component:outer-start-end", + "mustHave": false + }, + { + "attributeRef": "Observation.component:ref-allele", + "mustHave": false + }, + { + "attributeRef": "Observation.component:alt-allele", + "mustHave": false + }, + { + "attributeRef": "Observation.component:coding-change-type", + "mustHave": false + }, + { + "attributeRef": "Observation.component:genomic-source-class", + "mustHave": false + }, + { + "attributeRef": "Observation.component:sample-allelic-frequency", + "mustHave": false + }, + { + "attributeRef": "Observation.component:allelic-read-depth", + "mustHave": false + }, + { + "attributeRef": "Observation.component:allelic-state", + "mustHave": false + }, + { + "attributeRef": "Observation.component:variant-inheritance", + "mustHave": false + }, + { + "attributeRef": "Observation.component:variation-code", + "mustHave": false + }, + { + "attributeRef": "Observation.component:chromosome-identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.component:protein-hgvs", + "mustHave": false + }, + { + "attributeRef": "Observation.component:amino-acid-change-type", + "mustHave": false + }, + { + "attributeRef": "Observation.component:molecular-consequence", + "mustHave": false + }, + { + "attributeRef": "Observation.component:copy-number", + "mustHave": false + }, + { + "attributeRef": "Observation.component:variant-confidence-status", + "mustHave": false + }, + { + "attributeRef": "Observation.component:dna-region", + "mustHave": false + }, + { + "attributeRef": "Observation.component:gene-fusion", + "mustHave": false + }, + { + "attributeRef": "Observation.component:detection-limit", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/therapeutische-implikation", + "attributes": [ + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.derivedFrom", + "mustHave": false + }, + { + "attributeRef": "Observation.component", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/untersuchte-region", + "attributes": [ + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.component:conclusion-string", + "mustHave": false + }, + { + "attributeRef": "Observation.component:gene-studied", + "mustHave": false + }, + { + "attributeRef": "Observation.component:gene-mutations", + "mustHave": false + }, + { + "attributeRef": "Observation.component:region-description", + "mustHave": false + }, + { + "attributeRef": "Observation.component:region-coverage", + "mustHave": false + }, + { + "attributeRef": "Observation.component:ranges-examined", + "mustHave": false + }, + { + "attributeRef": "Observation.component:genomic-ref-seq", + "mustHave": false + }, + { + "attributeRef": "Observation.component:uncallable-regions", + "mustHave": false + }, + { + "attributeRef": "Observation.component:transcript-ref-seq", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/polygener-risiko-score", + "attributes": [ + { + "attributeRef": "RiskAssessment.identifier", + "mustHave": false + }, + { + "attributeRef": "RiskAssessment.status", + "mustHave": false + }, + { + "attributeRef": "RiskAssessment.code", + "mustHave": false + }, + { + "attributeRef": "RiskAssessment.encounter", + "mustHave": false + }, + { + "attributeRef": "RiskAssessment.occurrence[x]", + "mustHave": false + }, + { + "attributeRef": "RiskAssessment.condition", + "mustHave": false + }, + { + "attributeRef": "RiskAssessment.basis", + "mustHave": false + }, + { + "attributeRef": "RiskAssessment.prediction", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab", + "attributes": [ + { + "attributeRef": "Observation.identifier", + "mustHave": false + }, + { + "attributeRef": "Observation.status", + "mustHave": false + }, + { + "attributeRef": "Observation.category", + "mustHave": false + }, + { + "attributeRef": "Observation.code", + "mustHave": false + }, + { + "attributeRef": "Observation.encounter", + "mustHave": false + }, + { + "attributeRef": "Observation.effective[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.issued", + "mustHave": false + }, + { + "attributeRef": "Observation.value[x]", + "mustHave": false + }, + { + "attributeRef": "Observation.dataAbsentReason", + "mustHave": false + }, + { + "attributeRef": "Observation.interpretation", + "mustHave": false + }, + { + "attributeRef": "Observation.note", + "mustHave": false + }, + { + "attributeRef": "Observation.method", + "mustHave": false + }, + { + "attributeRef": "Observation.specimen", + "mustHave": false + }, + { + "attributeRef": "Observation.device", + "mustHave": false + }, + { + "attributeRef": "Observation.referenceRange", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ServiceRequestLab", + "attributes": [ + { + "attributeRef": "ServiceRequest.identifier", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.status", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.intent", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.category", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.code", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.encounter", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.authoredOn", + "mustHave": false + }, + { + "attributeRef": "ServiceRequest.specimen", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + }, + { + "groupReference": "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab", + "attributes": [ + { + "attributeRef": "DiagnosticReport.identifier", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.basedOn", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.status", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.category", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.code", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.encounter", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.effective[x]", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.issued", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.performer", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.specimen", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.result", + "mustHave": false + }, + { + "attributeRef": "DiagnosticReport.conclusion", + "mustHave": false + } + ], + "filter": [ + { + "type": "date", + "name": "date", + "start": "2020", + "end": "2025" + } + ] + } + ] + } +} diff --git a/src/test/resources/CRTDL/CRTDL_diagnosis_basic.json b/src/test/resources/CRTDL/CRTDL_diagnosis_basic.json index 4532d6f..cea33fb 100644 --- a/src/test/resources/CRTDL/CRTDL_diagnosis_basic.json +++ b/src/test/resources/CRTDL/CRTDL_diagnosis_basic.json @@ -1,6 +1,43 @@ { "version": "http://json-schema.org/to-be-done/schema#", + "display": "","cohortDefinition": { + "version": "http://to_be_decided.com/draft-1/schema#", "display": "", + "inclusionCriteria": [ + [ + { + "termCodes": [ + { + "code": "263495000", + "system": "http://snomed.info/sct", + "display": "Geschlecht" + } + ], + "context": { + "code": "Patient", + "system": "fdpg.mii.cds", + "version": "1.0.0", + "display": "Patient" + }, + "valueFilter": { + "selectedConcepts": [ + { + "code": "female", + "display": "Female", + "system": "http://hl7.org/fhir/administrative-gender" + }, + { + "code": "male", + "display": "Male", + "system": "http://hl7.org/fhir/administrative-gender" + } + ], + "type": "concept" + } + } + ] + ] +}, "dataExtraction": { "attributeGroups": [ { @@ -17,7 +54,7 @@ "name": "code", "codes": [ { - "code": "789012", + "code": "45252009", "system": "http://snomed.info/sct" } ] diff --git a/src/test/resources/CRTDL/CRTDL_diagnosis_basic_code.json b/src/test/resources/CRTDL/CRTDL_diagnosis_basic_code.json index ed85c14..6e362bc 100644 --- a/src/test/resources/CRTDL/CRTDL_diagnosis_basic_code.json +++ b/src/test/resources/CRTDL/CRTDL_diagnosis_basic_code.json @@ -1,6 +1,43 @@ { "version": "http://json-schema.org/to-be-done/schema#", + "display": "","cohortDefinition": { + "version": "http://to_be_decided.com/draft-1/schema#", "display": "", + "inclusionCriteria": [ + [ + { + "termCodes": [ + { + "code": "263495000", + "system": "http://snomed.info/sct", + "display": "Geschlecht" + } + ], + "context": { + "code": "Patient", + "system": "fdpg.mii.cds", + "version": "1.0.0", + "display": "Patient" + }, + "valueFilter": { + "selectedConcepts": [ + { + "code": "female", + "display": "Female", + "system": "http://hl7.org/fhir/administrative-gender" + }, + { + "code": "male", + "display": "Male", + "system": "http://hl7.org/fhir/administrative-gender" + } + ], + "type": "concept" + } + } + ] + ] +}, "dataExtraction": { "attributeGroups": [ { @@ -17,7 +54,7 @@ "name": "code", "codes": [ { - "code": "789012", + "code": "45252009", "system": "http://snomed.info/sct" } ] diff --git a/src/test/resources/CRTDL/CRTDL_diagnosis_basic_date.json b/src/test/resources/CRTDL/CRTDL_diagnosis_basic_date.json index c447dab..bc90304 100644 --- a/src/test/resources/CRTDL/CRTDL_diagnosis_basic_date.json +++ b/src/test/resources/CRTDL/CRTDL_diagnosis_basic_date.json @@ -1,6 +1,43 @@ { "version": "http://json-schema.org/to-be-done/schema#", + "display": "","cohortDefinition": { + "version": "http://to_be_decided.com/draft-1/schema#", "display": "", + "inclusionCriteria": [ + [ + { + "termCodes": [ + { + "code": "263495000", + "system": "http://snomed.info/sct", + "display": "Geschlecht" + } + ], + "context": { + "code": "Patient", + "system": "fdpg.mii.cds", + "version": "1.0.0", + "display": "Patient" + }, + "valueFilter": { + "selectedConcepts": [ + { + "code": "female", + "display": "Female", + "system": "http://hl7.org/fhir/administrative-gender" + }, + { + "code": "male", + "display": "Male", + "system": "http://hl7.org/fhir/administrative-gender" + } + ], + "type": "concept" + } + } + ] + ] +}, "dataExtraction": { "attributeGroups": [ { diff --git a/src/test/resources/CRTDL/CRTDL_diagnosis_observation.json b/src/test/resources/CRTDL/CRTDL_diagnosis_observation.json index e78a3f9..962cadc 100644 --- a/src/test/resources/CRTDL/CRTDL_diagnosis_observation.json +++ b/src/test/resources/CRTDL/CRTDL_diagnosis_observation.json @@ -1,6 +1,43 @@ { "version": "http://json-schema.org/to-be-done/schema#", + "display": "","cohortDefinition": { + "version": "http://to_be_decided.com/draft-1/schema#", "display": "", + "inclusionCriteria": [ + [ + { + "termCodes": [ + { + "code": "263495000", + "system": "http://snomed.info/sct", + "display": "Geschlecht" + } + ], + "context": { + "code": "Patient", + "system": "fdpg.mii.cds", + "version": "1.0.0", + "display": "Patient" + }, + "valueFilter": { + "selectedConcepts": [ + { + "code": "female", + "display": "Female", + "system": "http://hl7.org/fhir/administrative-gender" + }, + { + "code": "male", + "display": "Male", + "system": "http://hl7.org/fhir/administrative-gender" + } + ], + "type": "concept" + } + } + ] + ] +}, "dataExtraction": { "attributeGroups": [ { @@ -17,7 +54,7 @@ "name": "code", "codes": [ { - "code": "789012", + "code": "45252009", "system": "http://snomed.info/sct" } ] diff --git a/src/test/resources/CRTDL/CRTDL_patient.json b/src/test/resources/CRTDL/CRTDL_patient.json index 64d5beb..7288662 100644 --- a/src/test/resources/CRTDL/CRTDL_patient.json +++ b/src/test/resources/CRTDL/CRTDL_patient.json @@ -1,6 +1,44 @@ { "version": "http://json-schema.org/to-be-done/schema#", "display": "", + "cohortDefinition": { + "version": "http://to_be_decided.com/draft-1/schema#", + "display": "", + "inclusionCriteria": [ + [ + { + "termCodes": [ + { + "code": "263495000", + "system": "http://snomed.info/sct", + "display": "Geschlecht" + } + ], + "context": { + "code": "Patient", + "system": "fdpg.mii.cds", + "version": "1.0.0", + "display": "Patient" + }, + "valueFilter": { + "selectedConcepts": [ + { + "code": "female", + "display": "Female", + "system": "http://hl7.org/fhir/administrative-gender" + }, + { + "code": "male", + "display": "Male", + "system": "http://hl7.org/fhir/administrative-gender" + } + ], + "type": "concept" + } + } + ] + ] + }, "dataExtraction": { "attributeGroups": [ { diff --git a/src/test/resources/CRTDL_Library/Parameters_all_fields.json b/src/test/resources/CRTDL_Parameters/Parameters_all_fields.json similarity index 100% rename from src/test/resources/CRTDL_Library/Parameters_all_fields.json rename to src/test/resources/CRTDL_Parameters/Parameters_all_fields.json diff --git a/src/test/resources/CRTDL_Library/Parameters_observation_all_fields.json b/src/test/resources/CRTDL_Parameters/Parameters_observation_all_fields.json similarity index 100% rename from src/test/resources/CRTDL_Library/Parameters_observation_all_fields.json rename to src/test/resources/CRTDL_Parameters/Parameters_observation_all_fields.json diff --git a/src/test/resources/CRTDL_Parameters/Paremeters_all_fields_consent.json b/src/test/resources/CRTDL_Parameters/Paremeters_all_fields_consent.json new file mode 100644 index 0000000..2062502 --- /dev/null +++ b/src/test/resources/CRTDL_Parameters/Paremeters_all_fields_consent.json @@ -0,0 +1,9 @@ +{ + "resourceType" : "Parameters", + "id" : "example", + "parameter" : [ + { + "name": "crtdl", + "valueBase64Binary": "ewogICJ2ZXJzaW9uIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvdG8tYmUtZG9uZS9zY2hlbWEjIiwKICAiZGlzcGxheSI6ICIiLAogICJjb2hvcnREZWZpbml0aW9uIjogICB7CiAgICAidmVyc2lvbiI6ICJodHRwOi8vdG9fYmVfZGVjaWRlZC5jb20vZHJhZnQtMS9zY2hlbWEjIiwKICAgICJkaXNwbGF5IjogIiIsCiAgICAiaW5jbHVzaW9uQ3JpdGVyaWEiOiBbCiAgICAgIFsKICAgICAgICB7CiAgICAgICAgICAiY29udGV4dCI6IHsKICAgICAgICAgICAgImNvZGUiOiAiRWlud2lsbGlndW5nIiwKICAgICAgICAgICAgImRpc3BsYXkiOiAiRWlud2lsbGlndW5nIiwKICAgICAgICAgICAgInN5c3RlbSI6ICJmZHBnLm1paS5jZHMiLAogICAgICAgICAgICAidmVyc2lvbiI6ICIxLjAuMCIKICAgICAgICAgIH0sCiAgICAgICAgICAidGVybUNvZGVzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgImNvZGUiOiAieWVzLXllcy1uby15ZXMiLAogICAgICAgICAgICAgICJkaXNwbGF5IjogIlZlcnRlaWx0ZSwgRVUtRFNHVk8ga29uZm9ybWUgQW5hbHlzZSwgb2huZSBLcmFua2VuYXNzZW5kYXRlbiwgdW5kIG1pdCBSZWtvbnRha3RpZXJ1bmciLAogICAgICAgICAgICAgICJzeXN0ZW0iOiAiZmRwZy5jb25zZW50LmNvbWJpbmVkIgogICAgICAgICAgICB9CiAgICAgICAgICBdCiAgICAgICAgfQogICAgICBdCiAgICBdCiAgfSwKICAiZGF0YUV4dHJhY3Rpb24iOiB7CiAgICAiYXR0cmlidXRlR3JvdXBzIjogWwogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9jb3JlL21vZHVsLW1lZGlrYXRpb24vU3RydWN0dXJlRGVmaW5pdGlvbi9NZWRpY2F0aW9uU3RhdGVtZW50IiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uU3RhdGVtZW50LmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uU3RhdGVtZW50LmJhc2VkT24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uU3RhdGVtZW50LnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25TdGF0ZW1lbnQuc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblN0YXRlbWVudC5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25TdGF0ZW1lbnQubWVkaWNhdGlvblt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25TdGF0ZW1lbnQuY29udGV4dCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25TdGF0ZW1lbnQuZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblN0YXRlbWVudC5kYXRlQXNzZXJ0ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uU3RhdGVtZW50LmluZm9ybWF0aW9uU291cmNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblN0YXRlbWVudC5yZWFzb25Db2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblN0YXRlbWVudC5yZWFzb25SZWZlcmVuY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uU3RhdGVtZW50Lm5vdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uU3RhdGVtZW50LmRvc2FnZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvY29yZS9tb2R1bC1tZWRpa2F0aW9uL1N0cnVjdHVyZURlZmluaXRpb24vbWVkaWthdGlvbnNsaXN0ZSIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTGlzdC5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTGlzdC5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJMaXN0Lm1vZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJMaXN0LmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJMaXN0LmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkxpc3QuZGF0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkxpc3QuZW50cnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2NvcmUvbW9kdWwtbWVkaWthdGlvbi9TdHJ1Y3R1cmVEZWZpbml0aW9uL01lZGljYXRpb25SZXF1ZXN0IiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uUmVxdWVzdC5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblJlcXVlc3Quc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblJlcXVlc3QuaW50ZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblJlcXVlc3QubWVkaWNhdGlvblt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25SZXF1ZXN0LmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25SZXF1ZXN0LmF1dGhvcmVkT24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uUmVxdWVzdC5yZXF1ZXN0ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uUmVxdWVzdC5yZWNvcmRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25SZXF1ZXN0LnJlYXNvbkNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uUmVxdWVzdC5yZWFzb25SZWZlcmVuY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uUmVxdWVzdC5iYXNlZE9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblJlcXVlc3Qubm90ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25SZXF1ZXN0LmRvc2FnZUluc3RydWN0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblJlcXVlc3Quc3Vic3RpdHV0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvblJlcXVlc3QucHJpb3JQcmVzY3JpcHRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uUmVxdWVzdC5kZXRlY3RlZElzc3VlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9jb3JlL21vZHVsLW1lZGlrYXRpb24vU3RydWN0dXJlRGVmaW5pdGlvbi9NZWRpY2F0aW9uIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uLmZvcm0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uLmluZ3JlZGllbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2NvcmUvbW9kdWwtbWVkaWthdGlvbi9TdHJ1Y3R1cmVEZWZpbml0aW9uL01lZGljYXRpb25BZG1pbmlzdHJhdGlvbiIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvbkFkbWluaXN0cmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uQWRtaW5pc3RyYXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvbkFkbWluaXN0cmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25BZG1pbmlzdHJhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25BZG1pbmlzdHJhdGlvbi5tZWRpY2F0aW9uW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvbkFkbWluaXN0cmF0aW9uLmNvbnRleHQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uQWRtaW5pc3RyYXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvbkFkbWluaXN0cmF0aW9uLnBlcmZvcm1lciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25BZG1pbmlzdHJhdGlvbi5yZWFzb25Db2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvbkFkbWluaXN0cmF0aW9uLnJlYXNvblJlZmVyZW5jZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk1lZGljYXRpb25BZG1pbmlzdHJhdGlvbi5yZXF1ZXN0IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiTWVkaWNhdGlvbkFkbWluaXN0cmF0aW9uLm5vdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJNZWRpY2F0aW9uQWRtaW5pc3RyYXRpb24uZG9zYWdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9tb2R1bC1jb25zZW50L1N0cnVjdHVyZURlZmluaXRpb24vbWlpLXByLWNvbnNlbnQtcHJvdmVuYW5jZSIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUHJvdmVuYW5jZS50YXJnZXQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJQcm92ZW5hbmNlLnJlY29yZGVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUHJvdmVuYW5jZS5hZ2VudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlByb3ZlbmFuY2UuZW50aXR5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUHJvdmVuYW5jZS5zaWduYXR1cmUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL21vZHVsLWNvbnNlbnQvU3RydWN0dXJlRGVmaW5pdGlvbi9taWktcHItY29uc2VudC1laW53aWxsaWd1bmciLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbnNlbnQuZXh0ZW5zaW9uOmRvbWFpblJlZmVyZW5jZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbnNlbnQuc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiQ29uc2VudC5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbnNlbnQucGF0aWVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbnNlbnQuZGF0ZVRpbWUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJDb25zZW50Lm9yZ2FuaXphdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbnNlbnQuc291cmNlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiQ29uc2VudC5wb2xpY3kiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJDb25zZW50LnBvbGljeVJ1bGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJDb25zZW50LnByb3Zpc2lvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvbW9kdWwtY29uc2VudC9TdHJ1Y3R1cmVEZWZpbml0aW9uL21paS1wci1jb25zZW50LWRvY3VtZW50cmVmZXJlbmNlIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEb2N1bWVudFJlZmVyZW5jZS5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEb2N1bWVudFJlZmVyZW5jZS5jb250ZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtYmlvYmFuay9TdHJ1Y3R1cmVEZWZpbml0aW9uL1N1YnN0YW5jZSIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3Vic3RhbmNlLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3Vic3RhbmNlLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTdWJzdGFuY2UuaW5ncmVkaWVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWJpb2JhbmsvU3RydWN0dXJlRGVmaW5pdGlvbi9Pcmdhbml6YXRpb24iLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9yZ2FuaXphdGlvbi5leHRlbnNpb246YmVzY2hyZWlidW5nIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT3JnYW5pemF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPcmdhbml6YXRpb24udHlwZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9yZ2FuaXphdGlvbi5uYW1lIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT3JnYW5pemF0aW9uLmFsaWFzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT3JnYW5pemF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9yZ2FuaXphdGlvbi5jb250YWN0IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtYmlvYmFuay9TdHJ1Y3R1cmVEZWZpbml0aW9uL1NwZWNpbWVuIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTcGVjaW1lbi5leHRlbnNpb246ZmVzdGdlc3RlbGx0ZURpYWdub3NlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3BlY2ltZW4uZXh0ZW5zaW9uOmdlaG9lcnRadSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlNwZWNpbWVuLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTcGVjaW1lbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTcGVjaW1lbi50eXBlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3BlY2ltZW4ucGFyZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3BlY2ltZW4ucmVxdWVzdCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlNwZWNpbWVuLmNvbGxlY3Rpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTcGVjaW1lbi5wcm9jZXNzaW5nIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3BlY2ltZW4uY29udGFpbmVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3BlY2ltZW4ubm90ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWJpb2JhbmsvU3RydWN0dXJlRGVmaW5pdGlvbi9TcGVjaW1lbkNvcmUiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlNwZWNpbWVuLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTcGVjaW1lbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTcGVjaW1lbi50eXBlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3BlY2ltZW4ucGFyZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3BlY2ltZW4ucmVxdWVzdCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlNwZWNpbWVuLmNvbGxlY3Rpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTcGVjaW1lbi5wcm9jZXNzaW5nIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3BlY2ltZW4uY29udGFpbmVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU3BlY2ltZW4ubm90ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvY29yZS9tb2R1bC1wcm96ZWR1ci9TdHJ1Y3R1cmVEZWZpbml0aW9uL1Byb2NlZHVyZSIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUHJvY2VkdXJlLmV4dGVuc2lvbjpEb2t1bWVudGF0aW9uc2RhdHVtIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUHJvY2VkdXJlLmV4dGVuc2lvbjpkdXJjaGZ1ZWhydW5nc2Fic2ljaHQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJQcm9jZWR1cmUuc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUHJvY2VkdXJlLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUHJvY2VkdXJlLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJQcm9jZWR1cmUucGVyZm9ybWVkW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUHJvY2VkdXJlLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUHJvY2VkdXJlLm5vdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2NvcmUvbW9kdWwtcGVyc29uL1N0cnVjdHVyZURlZmluaXRpb24vVml0YWxzdGF0dXMiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ubm90ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvY29yZS9tb2R1bC1wZXJzb24vU3RydWN0dXJlRGVmaW5pdGlvbi9QYXRpZW50UHNldWRvbnltaXNpZXJ0IiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJQYXRpZW50LmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJQYXRpZW50LmdlbmRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlBhdGllbnQuYmlydGhEYXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUGF0aWVudC5kZWNlYXNlZFt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlBhdGllbnQuYWRkcmVzcyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlBhdGllbnQubGluayIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvY29yZS9tb2R1bC1wZXJzb24vU3RydWN0dXJlRGVmaW5pdGlvbi9SZXNlYXJjaFN1YmplY3QiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlJlc2VhcmNoU3ViamVjdC5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUmVzZWFyY2hTdWJqZWN0LnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlJlc2VhcmNoU3ViamVjdC5wZXJpb2QiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJSZXNlYXJjaFN1YmplY3Quc3R1ZHkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJSZXNlYXJjaFN1YmplY3QuaW5kaXZpZHVhbCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlJlc2VhcmNoU3ViamVjdC5jb25zZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9jb3JlL21vZHVsLXBlcnNvbi9TdHJ1Y3R1cmVEZWZpbml0aW9uL1BhdGllbnQiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlBhdGllbnQuaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlBhdGllbnQubmFtZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlBhdGllbnQuZ2VuZGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUGF0aWVudC5iaXJ0aERhdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJQYXRpZW50LmRlY2Vhc2VkW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUGF0aWVudC5hZGRyZXNzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUGF0aWVudC5saW5rIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9jb3JlL21vZHVsLXBlcnNvbi9TdHJ1Y3R1cmVEZWZpbml0aW9uL1RvZGVzdXJzYWNoZSIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiQ29uZGl0aW9uLmNsaW5pY2FsU3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiQ29uZGl0aW9uLnZlcmlmaWNhdGlvblN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbmRpdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbmRpdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiQ29uZGl0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbmRpdGlvbi5yZWNvcmRlZERhdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJDb25kaXRpb24ubm90ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvY29yZS9tb2R1bC1kaWFnbm9zZS9TdHJ1Y3R1cmVEZWZpbml0aW9uL0RpYWdub3NlIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJDb25kaXRpb24uZXh0ZW5zaW9uOlJlZmVyZW56UHJpbWFlcmRpYWdub3NlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiQ29uZGl0aW9uLmV4dGVuc2lvbjpGZXN0c3RlbGx1bmdzZGF0dW0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJDb25kaXRpb24uY2xpbmljYWxTdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJDb25kaXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbmRpdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkNvbmRpdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJDb25kaXRpb24ub25zZXRbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJDb25kaXRpb24ucmVjb3JkZWREYXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiQ29uZGl0aW9uLm5vdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2NvcmUvbW9kdWwtZmFsbC9TdHJ1Y3R1cmVEZWZpbml0aW9uL0tvbnRha3RHZXN1bmRoZWl0c2VpbnJpY2h0dW5nIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJFbmNvdW50ZXIuZXh0ZW5zaW9uOkF1Zm5haG1lZ3J1bmQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJFbmNvdW50ZXIuaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkVuY291bnRlci5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJFbmNvdW50ZXIuY2xhc3MiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJFbmNvdW50ZXIudHlwZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkVuY291bnRlci5zZXJ2aWNlVHlwZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkVuY291bnRlci5wZXJpb2QiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJFbmNvdW50ZXIuZGlhZ25vc2lzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRW5jb3VudGVyLmhvc3BpdGFsaXphdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkVuY291bnRlci5sb2NhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkVuY291bnRlci5zZXJ2aWNlUHJvdmlkZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJFbmNvdW50ZXIucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vZGV2aWNlbWV0cmljLWVpbmdlc3RlbGx0ZS1nZW1lc3NlbmUtcGFyYW1ldGVyLWJlYXRtdW5nIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEZXZpY2VNZXRyaWMudHlwZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkRldmljZU1ldHJpYy5zb3VyY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEZXZpY2VNZXRyaWMuY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9saW5rc3ZlbnRyaWt1bGFlcmVzLWhlcnp6ZWl0dm9sdW1lbi1kdXJjaC1pbmRpa2F0b3J2ZXJkdWVubnVuZyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2xpbmtzdmVudHJpa3VsYWVyZXItZHJ1Y2siLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ubWV0aG9kIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9zYXVlcnN0b2Zmc2FldHRpZ3VuZy1pbS1ibHV0LXByZWR1a3RhbC1kdXJjaC1wdWxzb3h5bWV0cmllIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vbWF4aW1hbGVyLWJlYXRtdW5nc2RydWNrIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaXNzdWVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vYmVhdG11bmdzemVpdC1ob2hlbS1kcnVjayIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2tvZXJwZXJ0ZW1wZXJhdHVyLWJydXN0IiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vYXRlbXp1Z3ZvbHVtZW4tZWluc3RlbGx1bmciLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9saW5rc3ZlbnRyaWt1bGFlcmVzLXNjaGxhZ3ZvbHVtZW5pbmRleCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2VpbnN0ZWxsdW5nLWVpbmF0bXVuZ3N6ZWl0LWJlYXRtdW5nIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaXNzdWVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24va29lcnBlcnRlbXBlcmF0dXItbmFzYWwiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9pbnNwaXJhdG9yaXNjaGVyLWdhc2ZsdXNzIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaXNzdWVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vc3BvbnRhbmUtYXRlbWZyZXF1ZW56LWJlYXRtZXQiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9saW5rc3ZlbnRyaWt1bGFlcmVyLWhlcnppbmRleCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL21pdHRsZXJlci1iZWF0bXVuZ3NkcnVjayIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2F0ZW13ZWdzZHJ1Y2stYmVpLW1pdHRsZXJlbS1leHBpcmF0b3Jpc2NoZW0tZ2FzZmx1c3MiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi92ZW5vZXNlci1kcnVjayIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vemVpdHZlcmhhZWx0bmlzLWVpbi1hdXNhdG11bmciLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9zdWJzdGl0dWF0dm9sdW1lbiIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vcHVsbW9uYWxhcnRlcmllbGxlci13ZWRnZS1kcnVjayIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL3NhdWVyc3RvZmZzYWV0dGlndW5nLWltLWFydGVyaWVsbGVuLWJsdXQtZHVyY2gtcHVsc294eW1ldHJpZSIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL3Nwb250YW5lcy1hdGVtenVndm9sdW1lbiIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2tvZXJwZXJ0ZW1wZXJhdHVyLWdlbmVyaXNjaCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL3NhdWVyc3RvZmZzYWV0dGlndW5nLWltLWJsdXQtcG9zdGR1a3RhbC1kdXJjaC1wdWxzb3h5bWV0cmllIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vYmVhdG11bmdzemVpdC1uaWVkcmlnZW0tZHJ1Y2siLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9saW5rc3ZlbnRyaWt1bGFlcmVyLWhlcnppbmRleC1kdXJjaC1pbmRpa2F0b3J2ZXJkdWVubnVuZyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2tvZXJwZXJ0ZW1wZXJhdHVyLXJla3RhbCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2xpbmtzdmVudHJpa3VsYWVyZXItc2NobGFndm9sdW1lbmluZGV4LWR1cmNoLWluZGlrYXRvcnZlcmR1ZW5udW5nIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vc29uc3RpZ2UtcHVsc2F0aWxlLWRydWVja2UtZ2VuZXJpc2NoIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLm1ldGhvZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24va29lcnBlcnRlbXBlcmF0dXItdmFnaW5hbCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2tvZXJwZXJ0ZW1wZXJhdHVyLWxlbmRlbndpcmJlbHNhZXVsZSIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL3NhdWVyc3RvZmZnYXNmbHVzcyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24va29lcnBlcnRlbXBlcmF0dXItdHJvbW1lbGZlbGwiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9rb2VycGVydGVtcGVyYXR1ci11bnRlci1kZXItenVuZ2UiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9kYXVlci1leHRyYWtvcnBvcmFsZXItZ2FzYXVzdGF1c2NoIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9hdGVtenVndm9sdW1lbi13YWVocmVuZC1iZWF0bXVuZyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2hlcnpmcmVxdWVueiIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2Vpbmdlc3RlbGx0ZXItaW5zcGlyYXRvcmlzY2hlci1nYXNmbHVzcyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2RydWNrZGlmZmVyZW56LWJlYXRtdW5nIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaXNzdWVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vc3lzdGVtaXNjaGVyLXZhc2t1bGFlcmVyLXdpZGVyc3RhbmRzaW5kZXgiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9ibHV0Zmx1c3MtZXh0cmFrb3Jwb3JhbGVyLWdhc2F1c3RhdXNjaCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vcHVscyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2ljdS1kZXZpY2UiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkRldmljZS5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGV2aWNlLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkRldmljZS5kZXZpY2VOYW1lIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGV2aWNlLnR5cGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEZXZpY2UudmVyc2lvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkRldmljZS5wcm9wZXJ0eSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2hhZW1vZGlhbHlzZS1ibHV0Zmx1c3MiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL3BhcmFtZXRlci12b24tZXh0cmFrb3Jwb3JhbGVuLXZlcmZhaHJlbiIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vZW5kZXhwaXJhdG9yaXNjaGVyLWtvaGxlbmRpb3hpZHBhcnRpYWxkcnVjayIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2xpbmtzdmVudHJpa3VsYWVyZXMtc2NobGFndm9sdW1lbi1kdXJjaC1pbmRpa2F0b3J2ZXJkdWVubnVuZyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2luc3BpcmF0b3Jpc2NoZS1zYXVlcnN0b2ZmZnJha3Rpb24tZ2VtZXNzZW4iLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9iZWF0bXVuZ3N2b2x1bWVuLXByby1taW51dGUtbWFzY2hpbmVsbGVyLWJlYXRtdW5nIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaXNzdWVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24va29lcnBlcnRlbXBlcmF0dXItbGVpc3RlIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24va29lcnBlcnRlbXBlcmF0dXItbmFzZW4tcmFjaGVuLXJhdW0iLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9oZXJ6emVpdHZvbHVtZW4iLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9rb2VycGVydGVtcGVyYXR1ci1zcGVpc2Vyb2VocmUiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9zcG9udGFuZS1tZWNoYW5pc2NoZS1hdGVtZnJlcXVlbnotYmVhdG1ldCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2tvZXJwZXJ0ZW1wZXJhdHVyLXN0aXJuIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vaW50cmFrcmFuaWVsbGVyLWRydWNrLWljcCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2luc3BpcmF0b3Jpc2NoZS1zYXVlcnN0b2ZmZnJha3Rpb24tZWluZ2VzdGVsbHQiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9rb2VycGVydGVtcGVyYXR1ci1hY2hzZWwiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9rb2VycGVyZ2V3aWNodC1wZXJjZW50aWwtYWx0ZXJzYWJoYWVuZ2lnIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24va29lcnBlcnRlbXBlcmF0dXItaGFsc3dpcmJlbHNhZXVsZSIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2hvcm93aXR6LWluLWFydGVyaWVsbGVtLWJsdXQiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi96ZW50cmFsdmVub2VzZXItYmx1dGRydWNrIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vaWRlYWxlcy1rb2VycGVyZ2V3aWNodCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2xpbmtzYXRyaWFsZXItZHJ1Y2siLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ubWV0aG9kIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9yZWNodHNhdHJpYWxlci1kcnVjayIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5tZXRob2QiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2JsdXRmbHVzcy1jYXJkaW92YXNjdWxhZXJlcy1nZXJhZXQiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2V4c3BpcmF0b3Jpc2NoZXItZ2FzZmx1c3MiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9rb2VycGVydGVtcGVyYXR1ci1rZXJuIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vbWVjaGFuaXNjaGUtYXRlbWZyZXF1ZW56LWJlYXRtZXQiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9rb2VycGVyZ3JvZXNzZS1wZXJjZW50aWwiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9yZWNodHN2ZW50cmlrdWxhZXJlci1kcnVjayIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5tZXRob2QiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2tvZXJwZXJ0ZW1wZXJhdHVyLWF0ZW13ZWdlIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24va29lcnBlcnRlbXBlcmF0dXItYmx1dCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmludGVycHJldGF0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uYm9keVNpdGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2lvbmlzaWVydGVzLWthbHppdW0tbmllcmVuZXJzYXR6dmVyZmFocmVuIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9tb25pdG9yaW5nLXVuZC12aXRhbGRhdGVuIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vcGFyYW1ldGVyLXZvbi1iZWF0bXVuZyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2V4c3BpcmF0b3Jpc2NoZXItc2F1ZXJzdG9mZnBhcnRpYWxkcnVjayIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL2VpbnN0ZWxsdW5nLWF1c2F0bXVuZ3N6ZWl0LWJlYXRtdW5nIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaXNzdWVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vcHVsbW9uYWx2YXNrdWxhZXJlci13aWRlcnN0YW5kc2luZGV4IiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vZGV2aWNlbWV0cmljLWVpbmdlc3RlbGx0ZS1nZW1lc3NlbmUtcGFyYW1ldGVyLWV4dHJha29ycG9yYWxlLXZlcmZhaHJlbiIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGV2aWNlTWV0cmljLnR5cGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEZXZpY2VNZXRyaWMuc291cmNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGV2aWNlTWV0cmljLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24va29lcnBlcnRlbXBlcmF0dXItYnJ1c3R3aXJiZWxzYWV1bGUiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pbnRlcnByZXRhdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmJvZHlTaXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucmVmZXJlbmNlUmFuZ2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9hdGVtd2Vnc2RydWNrLWJlaS1udWxsLWV4cGlyYXRvcmlzY2hlbS1nYXNmbHVzcyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL3B1bG1vbmFsYXJ0ZXJpZWxsZXItYmx1dGRydWNrIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLm1ldGhvZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24va29lcnBlcnRlbXBlcmF0dXItaGFybmJsYXNlIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vcG9zaXRpdi1lbmRleHBpcmF0b3Jpc2NoZXItZHJ1Y2siLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9kYXVlci1oYWVtb2RpYWx5c2VzaXR6dW5nIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ucGFydE9mIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1pY3UvU3RydWN0dXJlRGVmaW5pdGlvbi9hcnRlcmllbGxlci1kcnVjayIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vYmx1dGZsdXNzaW5kZXgtZXh0cmFrb3Jwb3JhbGVyLWdhc2F1c3RhdXNjaCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vbGlua3N2ZW50cmlrdWxhZXJlcy1zY2hsYWd2b2x1bWVuIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ib2R5U2l0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnJlZmVyZW5jZVJhbmdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vc3BvbnRhbmVzLW1lY2hhbmlzY2hlcy1hdGVtenVndm9sdW1lbi13YWVocmVuZC1iZWF0bXVuZyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGF0YUFic2VudFJlYXNvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRldmljZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLWljdS9TdHJ1Y3R1cmVEZWZpbml0aW9uL3N1YnN0aXR1YXRmbHVzcyIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnBhcnRPZiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGV2aWNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtaWN1L1N0cnVjdHVyZURlZmluaXRpb24vdW50ZXJzdHVldHp1bmdzZHJ1Y2stYmVhdG11bmciLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5wYXJ0T2YiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lZmZlY3RpdmVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pc3N1ZWQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRhdGFBYnNlbnRSZWFzb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1tb2xnZW4vU3RydWN0dXJlRGVmaW5pdGlvbi9nZW5vdHlwIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmRlcml2ZWRGcm9tIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtbW9sZ2VuL1N0cnVjdHVyZURlZmluaXRpb24vbWVkaWthdGlvbnNlbXBmZWhsdW5nIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJUYXNrLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlRhc2suaW50ZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiVGFzay5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiVGFzay5mb3IiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJUYXNrLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlRhc2sucmVhc29uQ29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlRhc2sucmVhc29uUmVmZXJlbmNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtbW9sZ2VuL1N0cnVjdHVyZURlZmluaXRpb24vZW1wZm9obGVuZS1mb2xnZW1hc3NuYWhtZSIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiVGFzay5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJUYXNrLmludGVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlRhc2suY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlRhc2suZm9yIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiVGFzay5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJUYXNrLnJlYXNvbkNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJUYXNrLnJlYXNvblJlZmVyZW5jZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLW1vbGdlbi9TdHJ1Y3R1cmVEZWZpbml0aW9uL2ZhbWlsaWVuYW5hbW5lc2UiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkZhbWlseU1lbWJlckhpc3Rvcnkuc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRmFtaWx5TWVtYmVySGlzdG9yeS5wYXRpZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRmFtaWx5TWVtYmVySGlzdG9yeS5kYXRlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRmFtaWx5TWVtYmVySGlzdG9yeS5yZWxhdGlvbnNoaXAiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJGYW1pbHlNZW1iZXJIaXN0b3J5LnNleCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkZhbWlseU1lbWJlckhpc3RvcnkucmVhc29uQ29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkZhbWlseU1lbWJlckhpc3RvcnkucmVhc29uUmVmZXJlbmNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRmFtaWx5TWVtYmVySGlzdG9yeS5jb25kaXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1tb2xnZW4vU3RydWN0dXJlRGVmaW5pdGlvbi9lcmdlYm5pcy16dXNhbW1lbmZhc3N1bmciLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OmNvbmNsdXNpb24tc3RyaW5nIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtbW9sZ2VuL1N0cnVjdHVyZURlZmluaXRpb24vbW9sZWt1bGFyZ2VuZXRpc2NoZXItYmVmdW5kYmVyaWNodCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5leHRlbnNpb246Z2Vub21pY3MtYXJ0aWZhY3QiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEaWFnbm9zdGljUmVwb3J0LmV4dGVuc2lvbjpnZW5vbWljcy1maWxlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5leHRlbnNpb246cmVjb21tZW5kZWQtYWN0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5leHRlbnNpb246Z2Vub21pY3Mtcmlzay1hc3Nlc3NtZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5leHRlbnNpb246Y29kZWQtbm90ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkRpYWdub3N0aWNSZXBvcnQuZXh0ZW5zaW9uOnN1cHBvcnRpbmctaW5mbyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkRpYWdub3N0aWNSZXBvcnQuc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEaWFnbm9zdGljUmVwb3J0Lmlzc3VlZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkRpYWdub3N0aWNSZXBvcnQucGVyZm9ybWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5yZXN1bHRzSW50ZXJwcmV0ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEaWFnbm9zdGljUmVwb3J0LnNwZWNpbWVuIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5yZXN1bHQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEaWFnbm9zdGljUmVwb3J0Lm1lZGlhIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5jb25jbHVzaW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5jb25jbHVzaW9uQ29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLW1vbGdlbi9TdHJ1Y3R1cmVEZWZpbml0aW9uL2RpYWdub3N0aXNjaGUtaW1wbGlrYXRpb24iLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmV4dGVuc2lvbjpyZWxhdGVkLWFydGlmYWN0IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZGVyaXZlZEZyb20iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1tb2xnZW4vU3RydWN0dXJlRGVmaW5pdGlvbi9hbmZvcmRlcnVuZy1nZW5ldGlzY2hlci10ZXN0IiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTZXJ2aWNlUmVxdWVzdC5iYXNlZE9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU2VydmljZVJlcXVlc3QuY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlNlcnZpY2VSZXF1ZXN0LmVuY291bnRlciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlNlcnZpY2VSZXF1ZXN0LmF1dGhvcmVkT24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTZXJ2aWNlUmVxdWVzdC5yZXF1ZXN0ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTZXJ2aWNlUmVxdWVzdC5yZWFzb25Db2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU2VydmljZVJlcXVlc3QucmVhc29uUmVmZXJlbmNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU2VydmljZVJlcXVlc3Quc3VwcG9ydGluZ0luZm8iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTZXJ2aWNlUmVxdWVzdC5ub3RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtbW9sZ2VuL1N0cnVjdHVyZURlZmluaXRpb24vbWlrcm9zYXRlbGxpdGVuaW5zdGFiaWxpdGFldCIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6Y29uY2x1c2lvbi1zdHJpbmciLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAiZ3JvdXBSZWZlcmVuY2UiOiAiaHR0cHM6Ly93d3cubWVkaXppbmluZm9ybWF0aWstaW5pdGlhdGl2ZS5kZS9maGlyL2V4dC9tb2R1bC1tb2xnZW4vU3RydWN0dXJlRGVmaW5pdGlvbi9tdXRhdGlvbnNsYXN0IiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi52YWx1ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnNwZWNpbWVuIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9leHQvbW9kdWwtbW9sZ2VuL1N0cnVjdHVyZURlZmluaXRpb24vdmFyaWFudGUiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29kZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLnZhbHVlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ubWV0aG9kIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3BlY2ltZW4iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6Y29uY2x1c2lvbi1zdHJpbmciLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6Z2VuZS1zdHVkaWVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OmN5dG9nZW5ldGljLWxvY2F0aW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OnJlZmVyZW5jZS1zZXF1ZW5jZS1hc3NlbWJseSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDpjb2RpbmctaGd2cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDpnZW5vbWljLWhndnMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6Z2Vub21pYy1yZWYtc2VxIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OnRyYW5zY3JpcHQtcmVmLXNlcSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDpleGFjdC1zdGFydC1lbmQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6aW5uZXItc3RhcnQtZW5kIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50Om91dGVyLXN0YXJ0LWVuZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDpyZWYtYWxsZWxlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OmFsdC1hbGxlbGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6Y29kaW5nLWNoYW5nZS10eXBlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50Omdlbm9taWMtc291cmNlLWNsYXNzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OnNhbXBsZS1hbGxlbGljLWZyZXF1ZW5jeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDphbGxlbGljLXJlYWQtZGVwdGgiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6YWxsZWxpYy1zdGF0ZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDp2YXJpYW50LWluaGVyaXRhbmNlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OnZhcmlhdGlvbi1jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OmNocm9tb3NvbWUtaWRlbnRpZmllciIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDpwcm90ZWluLWhndnMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6YW1pbm8tYWNpZC1jaGFuZ2UtdHlwZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDptb2xlY3VsYXItY29uc2VxdWVuY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6Y29weS1udW1iZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6dmFyaWFudC1jb25maWRlbmNlLXN0YXR1cyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDpkbmEtcmVnaW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OmdlbmUtZnVzaW9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OmRldGVjdGlvbi1saW1pdCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLW1vbGdlbi9TdHJ1Y3R1cmVEZWZpbml0aW9uL3RoZXJhcGV1dGlzY2hlLWltcGxpa2F0aW9uIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jYXRlZ29yeSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvZGUiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXJpdmVkRnJvbSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLW1vbGdlbi9TdHJ1Y3R1cmVEZWZpbml0aW9uL3VudGVyc3VjaHRlLXJlZ2lvbiIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OmNvbmNsdXNpb24tc3RyaW5nIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OmdlbmUtc3R1ZGllZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDpnZW5lLW11dGF0aW9ucyIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDpyZWdpb24tZGVzY3JpcHRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6cmVnaW9uLWNvdmVyYWdlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OnJhbmdlcy1leGFtaW5lZCIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIk9ic2VydmF0aW9uLmNvbXBvbmVudDpnZW5vbWljLXJlZi1zZXEiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb21wb25lbnQ6dW5jYWxsYWJsZS1yZWdpb25zIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY29tcG9uZW50OnRyYW5zY3JpcHQtcmVmLXNlcSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvZXh0L21vZHVsLW1vbGdlbi9TdHJ1Y3R1cmVEZWZpbml0aW9uL3BvbHlnZW5lci1yaXNpa28tc2NvcmUiLAogICAgICAgICJhdHRyaWJ1dGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlJpc2tBc3Nlc3NtZW50LmlkZW50aWZpZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJSaXNrQXNzZXNzbWVudC5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJSaXNrQXNzZXNzbWVudC5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUmlza0Fzc2Vzc21lbnQuZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUmlza0Fzc2Vzc21lbnQub2NjdXJyZW5jZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlJpc2tBc3Nlc3NtZW50LmNvbmRpdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlJpc2tBc3Nlc3NtZW50LmJhc2lzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiUmlza0Fzc2Vzc21lbnQucHJlZGljdGlvbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvY29yZS9tb2R1bC1sYWJvci9TdHJ1Y3R1cmVEZWZpbml0aW9uL09ic2VydmF0aW9uTGFiIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uZWZmZWN0aXZlW3hdIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaXNzdWVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24udmFsdWVbeF0iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kYXRhQWJzZW50UmVhc29uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uaW50ZXJwcmV0YXRpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5ub3RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24ubWV0aG9kIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiT2JzZXJ2YXRpb24uc3BlY2ltZW4iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5kZXZpY2UiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJPYnNlcnZhdGlvbi5yZWZlcmVuY2VSYW5nZSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZmlsdGVyIjogWwogICAgICAgICAgewogICAgICAgICAgICAidHlwZSI6ICJkYXRlIiwKICAgICAgICAgICAgIm5hbWUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJzdGFydCI6ICIyMDIwIiwKICAgICAgICAgICAgImVuZCI6ICIyMDI1IgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgewogICAgICAgICJncm91cFJlZmVyZW5jZSI6ICJodHRwczovL3d3dy5tZWRpemluaW5mb3JtYXRpay1pbml0aWF0aXZlLmRlL2ZoaXIvY29yZS9tb2R1bC1sYWJvci9TdHJ1Y3R1cmVEZWZpbml0aW9uL1NlcnZpY2VSZXF1ZXN0TGFiIiwKICAgICAgICAiYXR0cmlidXRlcyI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTZXJ2aWNlUmVxdWVzdC5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU2VydmljZVJlcXVlc3Quc3RhdHVzIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU2VydmljZVJlcXVlc3QuaW50ZW50IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU2VydmljZVJlcXVlc3QuY2F0ZWdvcnkiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJTZXJ2aWNlUmVxdWVzdC5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU2VydmljZVJlcXVlc3QuZW5jb3VudGVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiU2VydmljZVJlcXVlc3QuYXV0aG9yZWRPbiIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIlNlcnZpY2VSZXF1ZXN0LnNwZWNpbWVuIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0KICAgICAgICBdLAogICAgICAgICJmaWx0ZXIiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJ0eXBlIjogImRhdGUiLAogICAgICAgICAgICAibmFtZSI6ICJkYXRlIiwKICAgICAgICAgICAgInN0YXJ0IjogIjIwMjAiLAogICAgICAgICAgICAiZW5kIjogIjIwMjUiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICB7CiAgICAgICAgImdyb3VwUmVmZXJlbmNlIjogImh0dHBzOi8vd3d3Lm1lZGl6aW5pbmZvcm1hdGlrLWluaXRpYXRpdmUuZGUvZmhpci9jb3JlL21vZHVsLWxhYm9yL1N0cnVjdHVyZURlZmluaXRpb24vRGlhZ25vc3RpY1JlcG9ydExhYiIsCiAgICAgICAgImF0dHJpYnV0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5pZGVudGlmaWVyIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5iYXNlZE9uIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5zdGF0dXMiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEaWFnbm9zdGljUmVwb3J0LmNhdGVnb3J5IiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5jb2RlIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5lbmNvdW50ZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEaWFnbm9zdGljUmVwb3J0LmVmZmVjdGl2ZVt4XSIsCiAgICAgICAgICAgICJtdXN0SGF2ZSI6IGZhbHNlCiAgICAgICAgICB9LAogICAgICAgICAgewogICAgICAgICAgICAiYXR0cmlidXRlUmVmIjogIkRpYWdub3N0aWNSZXBvcnQuaXNzdWVkIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5wZXJmb3JtZXIiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEaWFnbm9zdGljUmVwb3J0LnNwZWNpbWVuIiwKICAgICAgICAgICAgIm11c3RIYXZlIjogZmFsc2UKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJhdHRyaWJ1dGVSZWYiOiAiRGlhZ25vc3RpY1JlcG9ydC5yZXN1bHQiLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgImF0dHJpYnV0ZVJlZiI6ICJEaWFnbm9zdGljUmVwb3J0LmNvbmNsdXNpb24iLAogICAgICAgICAgICAibXVzdEhhdmUiOiBmYWxzZQogICAgICAgICAgfQogICAgICAgIF0sCiAgICAgICAgImZpbHRlciI6IFsKICAgICAgICAgIHsKICAgICAgICAgICAgInR5cGUiOiAiZGF0ZSIsCiAgICAgICAgICAgICJuYW1lIjogImRhdGUiLAogICAgICAgICAgICAic3RhcnQiOiAiMjAyMCIsCiAgICAgICAgICAgICJlbmQiOiAiMjAyNSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0KICAgIF0KICB9Cn0K"} + ] +} \ No newline at end of file diff --git a/src/test/resources/DataStoreIT/expectedOutput/diagnosis_basic_bundle.json b/src/test/resources/DataStoreIT/expectedOutput/diagnosis_basic_bundle.json index 8cd0bf4..c753491 100644 --- a/src/test/resources/DataStoreIT/expectedOutput/diagnosis_basic_bundle.json +++ b/src/test/resources/DataStoreIT/expectedOutput/diagnosis_basic_bundle.json @@ -12,7 +12,7 @@ "code": { "coding": [ { "system": "http://snomed.info/sct", - "code": "789012", + "code": "45252009", "display": "Example diagnosis 3" } ] }, diff --git a/src/test/resources/DataStoreIT/expectedOutput/observation_all_fields.json b/src/test/resources/DataStoreIT/expectedOutput/observation_all_fields.json index 8e447e9..7a08222 100644 --- a/src/test/resources/DataStoreIT/expectedOutput/observation_all_fields.json +++ b/src/test/resources/DataStoreIT/expectedOutput/observation_all_fields.json @@ -42,7 +42,7 @@ "code": { "coding": [ { "system": "http://snomed.info/sct", - "code": "789012", + "code": "45252009", "display": "Example diagnosis 3" } ] }, diff --git a/src/test/resources/DataStoreIT/expectedOutput/observation_diagnosis_basic_bundle_id3.json b/src/test/resources/DataStoreIT/expectedOutput/observation_diagnosis_basic_bundle_id3.json index b0f85f1..899bc88 100644 --- a/src/test/resources/DataStoreIT/expectedOutput/observation_diagnosis_basic_bundle_id3.json +++ b/src/test/resources/DataStoreIT/expectedOutput/observation_diagnosis_basic_bundle_id3.json @@ -54,30 +54,37 @@ "resourceType": "Condition", "id": "4", "meta": { - "profile": [ "https://www.medizininformatik-initiative.de/fhir/core/modul-diagnose/StructureDefinition/Diagnose" ] + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-diagnose/StructureDefinition/Diagnose" + ] }, "code": { - "coding": [ { - "system": "http://snomed.info/sct", - "code": "789012", - "display": "Example diagnosis 3" - } ] + "coding": [ + { + "system": "http://snomed.info/sct", + "code": "45252009", + "display": "Example diagnosis 3" + } + ] }, "subject": { "reference": "Patient/3" }, "_recordedDate": { - "extension": [ { - "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", - "valueCode": "masked" - } ] + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "masked" + } + ] } }, "request": { "method": "PUT", "url": "Condition/4" } - }, { + }, + { "resource": { "resourceType": "Patient", "id": "3", diff --git a/src/test/resources/InputResources/Consent/VHF006_Consent.json b/src/test/resources/InputResources/Consent/VHF006_Consent.json new file mode 100644 index 0000000..32699bc --- /dev/null +++ b/src/test/resources/InputResources/Consent/VHF006_Consent.json @@ -0,0 +1,219 @@ +{ + "patient": { + "reference": "Patient/VHF00006" + }, + "category": [ + { + "coding": [ + { + "system": "http://loinc.org", + "code": "59284-0" + } + ] + } + ], + "provision": { + "provision": [ + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + } + + ], + "type": "deny", + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2050-12-31T00:00:00+01:00" + } + }, + "meta": { + "versionId": "6", + "lastUpdated": "2024-09-27T09:01:54.858Z", + "profile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Consent" + ] + }, + "resourceType": "Consent", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "research" + } + ] + }, + "policy": [ + { + "uri": "https://www.medizininformatik-initiative.de/sites/default/files/2020-04/MII_AG-Consent_Einheitlicher-Mustertext_v1.6d.pdf" + } + ], + "dateTime": "2021-01-01T00:00:00+01:00", + "status": "active", + "id": "VHF00006-CO-1" + } \ No newline at end of file diff --git a/src/test/resources/InputResources/Consent/VHF006_Consent_Fail.json b/src/test/resources/InputResources/Consent/VHF006_Consent_Fail.json new file mode 100644 index 0000000..a7e7e3e --- /dev/null +++ b/src/test/resources/InputResources/Consent/VHF006_Consent_Fail.json @@ -0,0 +1,138 @@ +{ + "patient": { + "reference": "Patient/VHF00006" + }, + "category": [ + { + "coding": [ + { + "system": "http://loinc.org", + "code": "59284-0" + } + ] + } + ], + "provision": { + "provision": [ + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10", + "display": "Krankenkassendaten retrospektiv uebertragen, speichern, nutzen" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.16", + "display": "KKDAT_5J_pro_speichern_verarbeiten" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2050-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.17", + "display": "KKDAT_5J_pro_wissenschaftlich_nutzen" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2050-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.39", + "display": "KKDAT_5J_pro_uebertragen_KVNR" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + }, + { + "type": "permit", + "code": [ + { + "coding": [ + { + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3", + "code": "2.16.840.1.113883.3.1937.777.24.5.3.25", + "display": "BIOMAT_Zusatzmengen_entnehmen" + } + ] + } + ], + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2025-12-31T00:00:00+01:00" + } + } + ], + "type": "deny", + "period": { + "start": "2021-01-01T00:00:00+01:00", + "end": "2050-12-31T00:00:00+01:00" + } + }, + "meta": { + "versionId": "6", + "lastUpdated": "2024-09-27T09:01:54.858Z", + "profile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Consent" + ] + }, + "resourceType": "Consent", + "scope": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/consentscope", + "code": "research" + } + ] + }, + "policy": [ + { + "uri": "https://www.medizininformatik-initiative.de/sites/default/files/2020-04/MII_AG-Consent_Einheitlicher-Mustertext_v1.6d.pdf" + } + ], + "dateTime": "2021-01-01T00:00:00+01:00", + "status": "active", + "id": "VHF00006-CO-1" + } \ No newline at end of file diff --git a/src/test/resources/InputResources/Observation/Observation_lab.json b/src/test/resources/InputResources/Observation/Observation_lab.json index 3fab503..7eb6c9a 100644 --- a/src/test/resources/InputResources/Observation/Observation_lab.json +++ b/src/test/resources/InputResources/Observation/Observation_lab.json @@ -46,7 +46,7 @@ } }, "resourceType": "Observation", - "effectiveDateTime": "2021-01-01T06:06:00+01:00", + "effectiveDateTime": "2022-01-01T06:06:00+01:00", "status": "final", "id": "VHF-MIXED-TEST-CASE-0001-a-E-1-OL-15", "code": { diff --git a/src/test/resources/InputResources/Observation/Observation_lab_vhf_00006.json b/src/test/resources/InputResources/Observation/Observation_lab_vhf_00006.json new file mode 100644 index 0000000..d8fbdbc --- /dev/null +++ b/src/test/resources/InputResources/Observation/Observation_lab_vhf_00006.json @@ -0,0 +1,84 @@ +{ + "category": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/observation-category", + "code": "laboratory", + "display": "Laboratory" + }, + { + "system": "http://loinc.org", + "code": "26436-6", + "display": "Laboratory studies (set)" + } + ] + } + ], + "meta": { + "versionId": "12002", + "lastUpdated": "2024-04-11T11:02:01.630Z", + "profile": [ + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab" + ] + }, + "encounter": { + "reference": "Encounter/VHF-MIXED-TEST-CASE-0001-a-E-1" + }, + "valueQuantity": { + "value": -666.66, + "_unit": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + }, + "system": "http://unitsofmeasure.org", + "_code": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", + "valueCode": "unknown" + } + ] + } + }, + "resourceType": "Observation", + "effectiveDateTime": "2022-01-01T06:06:00+01:00", + "status": "final", + "id": "VHF-MIXED-TEST-CASE-0001-a-E-1-OL-15", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "33762-6" + } + ], + "text": "NT-proBNP SerPl-mCnc" + }, + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0203", + "code": "OBI" + } + ] + }, + "system": "https://VHFMIXEDTESTCASEA.de/befund", + "value": "VHF-MIXED-TEST-CASE-0001-a-E-1-OL-15", + "assigner": { + "identifier": { + "system": "https://www.medizininformatik-initiative.de/fhir/core/NamingSystem/org-identifier", + "value": "VHFMIXEDTESTCASEA" + } + } + } + ], + "subject": { + "reference": "Patient/VHF00006" + } +} \ No newline at end of file diff --git a/src/test/resources/StructureDefinitions/StructureDefinition-mii-lm-fall.json b/src/test/resources/StructureDefinitions/StructureDefinition-mii-lm-fall.json old mode 100755 new mode 100644 index ce47862..e69de29 --- a/src/test/resources/StructureDefinitions/StructureDefinition-mii-lm-fall.json +++ b/src/test/resources/StructureDefinitions/StructureDefinition-mii-lm-fall.json @@ -1,342 +0,0 @@ -{ - "resourceType": "StructureDefinition", - "id": "mii-lm-fall", - "url": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/LogicalModel/Fall", - "version": "2024.0.0-ballot", - "name": "MII_LM_Fall", - "status": "active", - "description": "Logische Repräsentation des Basismoduls Fall", - "fhirVersion": "4.0.1", - "kind": "logical", - "abstract": false, - "type": "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/LogicalModel/Fall", - "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element", - "derivation": "specialization", - "differential": { - "element": [ - { - "id": "Fall", - "path": "Fall", - "definition": "Logische Repräsentation des Basismoduls Fall" - }, - { - "id": "Fall.Einrichtungskontakt", - "path": "Fall.Einrichtungskontakt", - "short": "Beschreibt den Kontakt zur Einrichtung, bestimmt durch den Behandlungsvertrag.", - "definition": "Beschreibt den Kontakt zur Einrichtung, bestimmt durch den Behandlungsvertrag.", - "min": 0, - "max": "*", - "type": [ - { - "code": "BackboneElement" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.KontaktEbene", - "path": "Fall.Einrichtungskontakt.KontaktEbene", - "short": "Für die Unterscheidung der Kontakt-Hierarchieebenen im Modul FALL werden folgende Ausprägungen unterschieden:\r\n\r\n1. Einrichtungskontakt\r\n\r\n2. Abteilungskontakt\r\n\r\n3. Versorgungsstellenkontakt\r\n\r\nDiese Gliederung gilt zunächst für stationäre Kontakte (siehe Kontakt-Klasse). Die Übertragung auf ambulante und teilstationäre Kontakte muss noch abgestimmt werden.", - "definition": "Für die Unterscheidung der Kontakt-Hierarchieebenen im Modul FALL werden folgende Ausprägungen unterschieden:\r\n\r\n1. Einrichtungskontakt\r\n\r\n2. Abteilungskontakt\r\n\r\n3. Versorgungsstellenkontakt\r\n\r\nDiese Gliederung gilt zunächst für stationäre Kontakte (siehe Kontakt-Klasse). Die Übertragung auf ambulante und teilstationäre Kontakte muss noch abgestimmt werden.", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.KontaktKlasse", - "path": "Fall.Einrichtungskontakt.KontaktKlasse", - "short": "Auf Einrichtungsebene, also auf der Kontakt-Ebene Einrichtungskontakt, kann die Kontakt-Klasse stationär, ambulant oder teilstationär sein.", - "definition": "Auf Einrichtungsebene, also auf der Kontakt-Ebene Einrichtungskontakt, kann die Kontakt-Klasse stationär, ambulant oder teilstationär sein.", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.KontaktArt", - "path": "Fall.Einrichtungskontakt.KontaktArt", - "short": "Differenzierung zwischen verschiedenen Arten von Kontakten (z.B. vorstationär, nachstationär, intensivstationär)", - "definition": "Differenzierung zwischen verschiedenen Arten von Kontakten (z.B. vorstationär, nachstationär, intensivstationär)", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.PatientenIdentifikator", - "path": "Fall.Einrichtungskontakt.PatientenIdentifikator", - "short": "Bei der internen Nutzung dient die sogenannte Patientennummer als Identifikator. Diese wird bei der ersten Aufnahme in die Einrichtung parallel zur ersten Fallnummer (Aufnahmenummer) vergeben. Bei jeder Wiederaufnahme (oder korrigierend danach) erfolgt eine Zuordnung zu dieser konstanten Patientennummer und die Vergabe einer neuen wechselnden Fallnummer.", - "definition": "Bei der internen Nutzung dient die sogenannte Patientennummer als Identifikator. Diese wird bei der ersten Aufnahme in die Einrichtung parallel zur ersten Fallnummer (Aufnahmenummer) vergeben. Bei jeder Wiederaufnahme (oder korrigierend danach) erfolgt eine Zuordnung zu dieser konstanten Patientennummer und die Vergabe einer neuen wechselnden Fallnummer.", - "min": 0, - "max": "*", - "type": [ - { - "code": "Identifier" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.Aufnahmenummer", - "path": "Fall.Einrichtungskontakt.Aufnahmenummer", - "short": "Jeder Patient erhält bei der Planung einer Aufnahme oder bei der Aufnahme selbst eine Aufnahmenummer (auch Fallnummer oder Krankenhausinternes Kennzeichen genannt). Im Prinzip gilt diese Aufnahmenummer von der Aufnahme bis zur Entlassung - und auch bei den zugehörigen vorstationären und nachstationären Kontakten. Sie dient bei allen digital unterstüzten Vorgängen der Zuordnung zu dem Aufenthalt des Patienten in der Einrichtung.", - "definition": "Jeder Patient erhält bei der Planung einer Aufnahme oder bei der Aufnahme selbst eine Aufnahmenummer (auch Fallnummer oder Krankenhausinternes Kennzeichen genannt). Im Prinzip gilt diese Aufnahmenummer von der Aufnahme bis zur Entlassung - und auch bei den zugehörigen vorstationären und nachstationären Kontakten. Sie dient bei allen digital unterstüzten Vorgängen der Zuordnung zu dem Aufenthalt des Patienten in der Einrichtung.", - "min": 0, - "max": "*", - "type": [ - { - "code": "Identifier" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.Aufnahmeanlass", - "path": "Fall.Einrichtungskontakt.Aufnahmeanlass", - "short": "Gemäß §21 KHEntgG", - "definition": "Gemäß §21 KHEntgG", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.Aufnahmegrund", - "path": "Fall.Einrichtungskontakt.Aufnahmegrund", - "short": "Gemäß §21 KHEntgG", - "definition": "Es ist der Aufnahmegrund entsprechend Schlüssel 1 der Anlage 2 zur § 301-Vereinbarung anzugeben. Als 3. und 4. Stelle (xx) sind die nach Schlüssel 1 möglichen Werte (01 bis 07, bei tagesbezogenen Ent- gelten auch 21 bis 27) anzugeben. Fälle mit den Werten „41“ bis „47“ in der 3. und 4. Stelle (Behandlun- gen im Rahmen von Verträgen zur integrierten Versorgung) können übermittelt werden.\r\nDer Aufnahmegrund kann bei Begleitpersonen und mitaufgenommenen Pflegekräften (Aufnahmeanlass „B“) entfallen. In allen anderen Fällen ist der Aufnahmegrund eine Muss-Angabe.", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.Beginndatum", - "path": "Fall.Einrichtungskontakt.Beginndatum", - "min": 0, - "max": "*", - "type": [ - { - "code": "dateTime" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.Enddatum", - "path": "Fall.Einrichtungskontakt.Enddatum", - "min": 0, - "max": "*", - "type": [ - { - "code": "dateTime" - } - ] - }, - { - "id": "Fall.Einrichtungskontakt.Entlassungsgrund", - "path": "Fall.Einrichtungskontakt.Entlassungsgrund", - "short": "Gemäß §21 KHEntgG", - "definition": "Gemäß §21 KHEntgG", - "min": 0, - "max": "*", - "type": [ - { - "code": "code" - } - ] - }, - { - "id": "Fall.Abteilungskontakt", - "path": "Fall.Abteilungskontakt", - "min": 0, - "max": "*", - "type": [ - { - "code": "BackboneElement" - } - ] - }, - { - "id": "Fall.Abteilungskontakt.KontaktEbene", - "path": "Fall.Abteilungskontakt.KontaktEbene", - "short": "Für die Unterscheidung der Kontakt-Hierarchieebenen im Modul FALL werden folgende Ausprägungen unterschieden:\r\n\r\n1. Einrichtungskontakt\r\n\r\n2. Abteilungskontakt\r\n\r\n3. Versorgungsstellenkontakt\r\n\r\nDiese Gliederung gilt zunächst für stationäre Kontakte (siehe Kontakt-Klasse). Die Übertragung auf ambulante und teilstationäre Kontakte muss noch abgestimmt werden.", - "definition": "Für die Unterscheidung der Kontakt-Hierarchieebenen im Modul FALL werden folgende Ausprägungen unterschieden:\r\n\r\n1. Einrichtungskontakt\r\n\r\n2. Abteilungskontakt\r\n\r\n3. Versorgungsstellenkontakt\r\n\r\nDiese Gliederung gilt zunächst für stationäre Kontakte (siehe Kontakt-Klasse). Die Übertragung auf ambulante und teilstationäre Kontakte muss noch abgestimmt werden.", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ] - }, - { - "id": "Fall.Abteilungskontakt.KontaktArt", - "path": "Fall.Abteilungskontakt.KontaktArt", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ] - }, - { - "id": "Fall.Abteilungskontakt.PatientenIdentifikator", - "path": "Fall.Abteilungskontakt.PatientenIdentifikator", - "short": "Bei der internen Nutzung dient die sogenannte Patientennummer als Identifikator. Diese wird bei der ersten Aufnahme in die Einrichtung parallel zur ersten Fallnummer (Aufnahmenummer) vergeben. Bei jeder Wiederaufnahme (oder korrigierend danach) erfolgt eine Zuordnung zu dieser konstanten Patientennummer und die Vergabe einer neuen wechselnden Fallnummer.", - "definition": "Bei der internen Nutzung dient die sogenannte Patientennummer als Identifikator. Diese wird bei der ersten Aufnahme in die Einrichtung parallel zur ersten Fallnummer (Aufnahmenummer) vergeben. Bei jeder Wiederaufnahme (oder korrigierend danach) erfolgt eine Zuordnung zu dieser konstanten Patientennummer und die Vergabe einer neuen wechselnden Fallnummer.", - "min": 0, - "max": "*", - "type": [ - { - "code": "Identifier" - } - ] - }, - { - "id": "Fall.Abteilungskontakt.Aufnahmenummer", - "path": "Fall.Abteilungskontakt.Aufnahmenummer", - "short": "Jeder Patient erhält bei der Planung einer Aufnahme oder bei der Aufnahme selbst eine Aufnahmenummer (auch Fallnummer oder Krankenhausinternes Kennzeichen genannt). Im Prinzip gilt diese Aufnahmenummer von der Aufnahme bis zur Entlassung - und auch bei den zugehörigen vorstationären und nachstationären Kontakten. Sie dient bei allen digital unterstüzten Vorgängen der Zuordnung zu dem Aufenthalt des Patienten in der Einrichtung. Im MII KDS dient sie als Identifikator bzw. Referenz zum Einrichtungskontakt.", - "definition": "Jeder Patient erhält bei der Planung einer Aufnahme oder bei der Aufnahme selbst eine Aufnahmenummer (auch Fallnummer oder Krankenhausinternes Kennzeichen genannt). Im Prinzip gilt diese Aufnahmenummer von der Aufnahme bis zur Entlassung - und auch bei den zugehörigen vorstationären und nachstationären Kontakten. Sie dient bei allen digital unterstüzten Vorgängen der Zuordnung zu dem Aufenthalt des Patienten in der Einrichtung. Im MII KDS dient sie als Identifikator bzw. Referenz zum Einrichtungskontakt.", - "min": 0, - "max": "*", - "type": [ - { - "code": "Identifier" - } - ] - }, - { - "id": "Fall.Abteilungskontakt.Beginndatum", - "path": "Fall.Abteilungskontakt.Beginndatum", - "min": 0, - "max": "*", - "type": [ - { - "code": "dateTime" - } - ] - }, - { - "id": "Fall.Abteilungskontakt.Enddatum", - "path": "Fall.Abteilungskontakt.Enddatum", - "min": 0, - "max": "*", - "type": [ - { - "code": "dateTime" - } - ] - }, - { - "id": "Fall.Abteilungskontakt.Fachabteilungsschluessel", - "path": "Fall.Abteilungskontakt.Fachabteilungsschluessel", - "short": "Bis auf Weiteres wird der proprietäre deutsche Fachabteilungsschlüssel des § 301 SGB V und des Datensatzes gemäß § 21 KHentgG als Fachrichtungsschlüssel genutzt, weil dieser in jedem Krankenhaus als |Fachabteilungsschlüssel im Einsatz ist. Der Einsatz des IHE-Fachabteilungsschlüssel wird geprüft, sobald einschlägige Anforderungen formuliert werden.", - "definition": "Bis auf Weiteres wird der proprietäre deutsche Fachabteilungsschlüssel des § 301 SGB V und des Datensatzes gemäß § 21 KHentgG als Fachrichtungsschlüssel genutzt, weil dieser in jedem Krankenhaus als |Fachabteilungsschlüssel im Einsatz ist. Der Einsatz des IHE-Fachabteilungsschlüssel wird geprüft, sobald einschlägige Anforderungen formuliert werden.", - "min": 0, - "max": "*", - "type": [ - { - "code": "code" - } - ] - }, - { - "id": "Fall.Versorgungsstellenkontakt", - "path": "Fall.Versorgungsstellenkontakt", - "min": 0, - "max": "*", - "type": [ - { - "code": "BackboneElement" - } - ] - }, - { - "id": "Fall.Versorgungsstellenkontakt.KontaktEbene", - "path": "Fall.Versorgungsstellenkontakt.KontaktEbene", - "short": "Für die Unterscheidung der Kontakt-Hierarchieebenen im Modul FALL werden folgende Ausprägungen unterschieden:\r\n\r\n1. Einrichtungskontakt\r\n\r\n2. Abteilungskontakt\r\n\r\n3. Versorgungsstellenkontakt\r\n\r\nDiese Gliederung gilt zunächst für stationäre Kontakte (siehe Kontakt-Klasse). Die Übertragung auf ambulante und teilstationäre Kontakte muss noch abgestimmt werden.", - "definition": "Für die Unterscheidung der Kontakt-Hierarchieebenen im Modul FALL werden folgende Ausprägungen unterschieden:\r\n\r\n1. Einrichtungskontakt\r\n\r\n2. Abteilungskontakt\r\n\r\n3. Versorgungsstellenkontakt\r\n\r\nDiese Gliederung gilt zunächst für stationäre Kontakte (siehe Kontakt-Klasse). Die Übertragung auf ambulante und teilstationäre Kontakte muss noch abgestimmt werden.", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ] - }, - { - "id": "Fall.Versorgungsstellenkontakt.KontaktArt", - "path": "Fall.Versorgungsstellenkontakt.KontaktArt", - "min": 0, - "max": "*", - "type": [ - { - "code": "CodeableConcept" - } - ] - }, - { - "id": "Fall.Versorgungsstellenkontakt.PatientenIdentifikator", - "path": "Fall.Versorgungsstellenkontakt.PatientenIdentifikator", - "short": "Bei der internen Nutzung dient die sogenannte Patientennummer als Identifikator. Diese wird bei der ersten Aufnahme in die Einrichtung parallel zur ersten Fallnummer (Aufnahmenummer) vergeben. Bei jeder Wiederaufnahme (oder korrigierend danach) erfolgt eine Zuordnung zu dieser konstanten Patientennummer und die Vergabe einer neuen wechselnden Fallnummer.", - "definition": "Bei der internen Nutzung dient die sogenannte Patientennummer als Identifikator. Diese wird bei der ersten Aufnahme in die Einrichtung parallel zur ersten Fallnummer (Aufnahmenummer) vergeben. Bei jeder Wiederaufnahme (oder korrigierend danach) erfolgt eine Zuordnung zu dieser konstanten Patientennummer und die Vergabe einer neuen wechselnden Fallnummer.", - "min": 0, - "max": "*", - "type": [ - { - "code": "Identifier" - } - ] - }, - { - "id": "Fall.Versorgungsstellenkontakt.Aufnahmenummer", - "path": "Fall.Versorgungsstellenkontakt.Aufnahmenummer", - "short": "Jeder Patient erhält bei der Planung einer Aufnahme oder bei der Aufnahme selbst eine Aufnahmenummer (auch Fallnummer oder Krankenhausinternes Kennzeichen genannt). Im Prinzip gilt diese Aufnahmenummer von der Aufnahme bis zur Entlassung - und auch bei den zugehörigen vorstationären und nachstationären Kontakten. Sie dient bei allen digital unterstüzten Vorgängen der Zuordnung zu dem Aufenthalt des Patienten in der Einrichtung. Im MII KDS dient sie als Identifikator bzw. Referenz zum Einrichtungskontakt.", - "definition": "Jeder Patient erhält bei der Planung einer Aufnahme oder bei der Aufnahme selbst eine Aufnahmenummer (auch Fallnummer oder Krankenhausinternes Kennzeichen genannt). Im Prinzip gilt diese Aufnahmenummer von der Aufnahme bis zur Entlassung - und auch bei den zugehörigen vorstationären und nachstationären Kontakten. Sie dient bei allen digital unterstüzten Vorgängen der Zuordnung zu dem Aufenthalt des Patienten in der Einrichtung. Im MII KDS dient sie als Identifikator bzw. Referenz zum Einrichtungskontakt.", - "min": 0, - "max": "*", - "type": [ - { - "code": "Identifier" - } - ] - }, - { - "id": "Fall.Versorgungsstellenkontakt.Beginndatum", - "path": "Fall.Versorgungsstellenkontakt.Beginndatum", - "min": 0, - "max": "*", - "type": [ - { - "code": "dateTime" - } - ] - }, - { - "id": "Fall.Versorgungsstellenkontakt.Enddatum", - "path": "Fall.Versorgungsstellenkontakt.Enddatum", - "min": 0, - "max": "*", - "type": [ - { - "code": "dateTime" - } - ] - } - ] - } -} diff --git a/src/test/resources/StructureDefinitions/StructureDefinition-mii-pr-fall-kontakt-gesundheitseinrichtung.json b/src/test/resources/StructureDefinitions/StructureDefinition-mii-pr-fall-kontakt-gesundheitseinrichtung.json old mode 100755 new mode 100644 diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml index 5242d88..be4770f 100644 --- a/src/test/resources/application.yml +++ b/src/test/resources/application.yml @@ -1,14 +1,24 @@ # Server configuration server: - port: 8080 + port: 8086 torch: profile: - dir: src/test/resources/StructureDefinitions + dir: structureDefinitions + mapping: + consent: src/test/resources/mappings/consent-mappings.json + consent_to_profile: src/test/resources/mappings/profile_to_consent.json fhir: url: http://localhost:8082/fhir + pageCount: 500 testPopulation: path: src/test/resources/BlazeBundle.json + oauth: + issuer: + uri: "https://auth.localhost:444/realms/blaze" + client: + id: "test" + secret: "tast" flare: url: http://localhost:8084 results: @@ -16,6 +26,10 @@ torch: persistence: PT12H30M5S # Time Block in ISO 8601 format batchsize: 2 maxConcurrency: 1 + mappingsFile: ontology/mapping_cql.json + conceptTreeFile: ontology/mapping_tree.json + dseMappingTreeFile: ontology/dse_mapping_tree.json + useCql: false nginx: servername: localhost:8080 filelocation: localhost:8080/output @@ -25,7 +39,7 @@ logging: org.springframework.web.reactive.function.client: info reactor.netty: info reactor: info - de.medizininformatikinitiative.torch: ${LOG_LEVEL:debug} + de.medizininformatikinitiative.torch: ${LOG_LEVEL:info} org.springframework: ${LOG_LEVEL:info} diff --git a/src/test/resources/docker-compose.yml b/src/test/resources/docker-compose.yml index 1062e68..ea3904e 100644 --- a/src/test/resources/docker-compose.yml +++ b/src/test/resources/docker-compose.yml @@ -13,7 +13,7 @@ services: start_period: 40s flare: - image: ghcr.io/medizininformatik-initiative/flare:2.4.0-alpha.1 + image: ghcr.io/medizininformatik-initiative/flare:develop environment: - LOG_LEVEL=info - FLARE_FHIR_SERVER=http://blaze:8080/fhir diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml new file mode 100644 index 0000000..24a99c3 --- /dev/null +++ b/src/test/resources/logback-test.xml @@ -0,0 +1,11 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + diff --git a/src/test/resources/mappings/consent-mappings.json b/src/test/resources/mappings/consent-mappings.json new file mode 100644 index 0000000..a489023 --- /dev/null +++ b/src/test/resources/mappings/consent-mappings.json @@ -0,0 +1,1418 @@ +[ + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8", + "display": "MDAT wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46", + "display": "MDAT retrospektiv wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10", + "display": "Krankenkassendaten retrospektiv uebertragen, speichern, nutzen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37", + "display": "Rekontaktierung Ergebnisse erheblicher Bedeutung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26", + "display": "Rekontaktierung Erg\u00e4nzungen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27", + "display": "Rekontaktierung Verkn\u00fcpfung Datenbanken", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28", + "display": "Rekontaktierung weitere Erhebung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29", + "display": "Rekontaktierung weitere Studien", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "yes-yes-yes-yes", + "display": "Verteilte, EU-DSGVO konforme Analyse, mit Krankenkassendaten, und mit Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8", + "display": "MDAT wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46", + "display": "MDAT retrospektiv wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10", + "display": "Krankenkassendaten retrospektiv uebertragen, speichern, nutzen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "yes-yes-yes-no", + "display": "Verteilte, EU-DSGVO konforme Analyse, mit Krankenkassendaten, und ohne Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8", + "display": "MDAT wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46", + "display": "MDAT retrospektiv wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37", + "display": "Rekontaktierung Ergebnisse erheblicher Bedeutung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26", + "display": "Rekontaktierung Erg\u00e4nzungen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27", + "display": "Rekontaktierung Verkn\u00fcpfung Datenbanken", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28", + "display": "Rekontaktierung weitere Erhebung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29", + "display": "Rekontaktierung weitere Studien", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "yes-yes-no-yes", + "display": "Verteilte, EU-DSGVO konforme Analyse, ohne Krankenassendaten, und mit Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8", + "display": "MDAT wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46", + "display": "MDAT retrospektiv wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "yes-yes-no-no", + "display": "Verteilte, EU-DSGVO konforme Analyse, ohne Krankenassendaten, und ohne Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.49", + "display": "MDAT bereitstellen non EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10", + "display": "Krankenkassendaten retrospektiv uebertragen, speichern, nutzen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37", + "display": "Rekontaktierung Ergebnisse erheblicher Bedeutung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26", + "display": "Rekontaktierung Erg\u00e4nzungen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27", + "display": "Rekontaktierung Verkn\u00fcpfung Datenbanken", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28", + "display": "Rekontaktierung weitere Erhebung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29", + "display": "Rekontaktierung weitere Studien", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "yes-no-yes-yes", + "display": "Verteilte, nicht EU-DSGVO konforme Analyse, mit Krankenkassendaten, und mit Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.49", + "display": "MDAT bereitstellen non EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10", + "display": "Krankenkassendaten retrospektiv uebertragen, speichern, nutzen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "yes-no-yes-no", + "display": "Verteilte, nicht EU-DSGVO konforme Analyse, mit Krankenkassendaten, und ohne Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.49", + "display": "MDAT bereitstellen non EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37", + "display": "Rekontaktierung Ergebnisse erheblicher Bedeutung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26", + "display": "Rekontaktierung Erg\u00e4nzungen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27", + "display": "Rekontaktierung Verkn\u00fcpfung Datenbanken", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28", + "display": "Rekontaktierung weitere Erhebung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29", + "display": "Rekontaktierung weitere Studien", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "yes-no-no-yes", + "display": "Verteilte, nicht EU-DSGVO konforme Analyse, ohne Krankenassendaten, und mit Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.49", + "display": "MDAT bereitstellen non EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "yes-no-no-no", + "display": "Verteilte, nicht EU-DSGVO konforme Analyse, ohne Krankenassendaten, und ohne Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.9", + "display": "MDAT zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.47", + "display": "MDAT retrospektiv zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8", + "display": "MDAT wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46", + "display": "MDAT retrospektiv wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10", + "display": "Krankenkassendaten retrospektiv uebertragen, speichern, nutzen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37", + "display": "Rekontaktierung Ergebnisse erheblicher Bedeutung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26", + "display": "Rekontaktierung Erg\u00e4nzungen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27", + "display": "Rekontaktierung Verkn\u00fcpfung Datenbanken", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28", + "display": "Rekontaktierung weitere Erhebung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29", + "display": "Rekontaktierung weitere Studien", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "no-yes-yes-yes", + "display": "Zentrale, EU-DSGVO konforme Analyse, mit Krankenkassendaten, und mit Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.9", + "display": "MDAT zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.47", + "display": "MDAT retrospektiv zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8", + "display": "MDAT wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46", + "display": "MDAT retrospektiv wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10", + "display": "Krankenkassendaten retrospektiv uebertragen, speichern, nutzen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "no-yes-yes-no", + "display": "Zentrale, EU-DSGVO konforme Analyse, mit Krankenkassendaten, und ohne Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.9", + "display": "MDAT zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.47", + "display": "MDAT retrospektiv zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8", + "display": "MDAT wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46", + "display": "MDAT retrospektiv wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37", + "display": "Rekontaktierung Ergebnisse erheblicher Bedeutung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26", + "display": "Rekontaktierung Erg\u00e4nzungen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27", + "display": "Rekontaktierung Verkn\u00fcpfung Datenbanken", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28", + "display": "Rekontaktierung weitere Erhebung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29", + "display": "Rekontaktierung weitere Studien", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "no-yes-no-yes", + "display": "Zentrale, EU-DSGVO konforme Analyse, ohne Krankenassendaten, und mit Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.9", + "display": "MDAT zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.47", + "display": "MDAT retrospektiv zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.8", + "display": "MDAT wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.46", + "display": "MDAT retrospektiv wissenschaftlich nutzen EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "no-yes-no-no", + "display": "Zentrale, EU-DSGVO konforme Analyse, ohne Krankenassendaten, und ohne Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.9", + "display": "MDAT zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.47", + "display": "MDAT retrospektiv zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.49", + "display": "MDAT bereitstellen non EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10", + "display": "Krankenkassendaten retrospektiv uebertragen, speichern, nutzen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37", + "display": "Rekontaktierung Ergebnisse erheblicher Bedeutung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26", + "display": "Rekontaktierung Erg\u00e4nzungen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27", + "display": "Rekontaktierung Verkn\u00fcpfung Datenbanken", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28", + "display": "Rekontaktierung weitere Erhebung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29", + "display": "Rekontaktierung weitere Studien", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "no-no-yes-yes", + "display": "Zentrale, nicht EU-DSGVO konforme Analyse, mit Krankenkassendaten, und mit Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.9", + "display": "MDAT zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.47", + "display": "MDAT retrospektiv zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.49", + "display": "MDAT bereitstellen non EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.10", + "display": "Krankenkassendaten retrospektiv uebertragen, speichern, nutzen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "no-no-yes-no", + "display": "Zentrale, nicht EU-DSGVO konforme Analyse, mit Krankenkassendaten, und ohne Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.9", + "display": "MDAT zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.47", + "display": "MDAT retrospektiv zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.49", + "display": "MDAT bereitstellen non EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.37", + "display": "Rekontaktierung Ergebnisse erheblicher Bedeutung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.26", + "display": "Rekontaktierung Erg\u00e4nzungen", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.27", + "display": "Rekontaktierung Verkn\u00fcpfung Datenbanken", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.28", + "display": "Rekontaktierung weitere Erhebung", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.29", + "display": "Rekontaktierung weitere Studien", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.31", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.30", + "display": "Rekontaktierung Zusatzbefund", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "no-no-no-yes", + "display": "Zentrale, nicht EU-DSGVO konforme Analyse, ohne Krankenassendaten, und mit Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + }, + { + "context": { + "code": "Einwilligung", + "display": "Einwilligung", + "system": "fdpg.mii.cds" + }, + "fhirResourceType": "Consent", + "fixedCriteria": [ + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.9", + "display": "MDAT zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.47", + "display": "MDAT retrospektiv zusammenfuehren Dritte", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + }, + { + "searchParameter": "mii-provision-provision-code", + "type": "coding", + "value": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.5.3.49", + "display": "MDAT bereitstellen non EU DSGVO NIVEAU", + "system": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3" + } + ] + } + ], + "key": { + "code": "no-no-no-no", + "display": "Zentrale, nicht EU-DSGVO konforme Analyse, ohne Krankenassendaten, und ohne Rekontaktierung", + "system": "fdpg.consent.combined" + }, + "name": "combined-consent", + "timeRestrictionParameter": "date" + } +] \ No newline at end of file diff --git a/src/test/resources/mappings/profile_to_consent.json b/src/test/resources/mappings/profile_to_consent.json new file mode 100644 index 0000000..fdcd121 --- /dev/null +++ b/src/test/resources/mappings/profile_to_consent.json @@ -0,0 +1,148 @@ +{ + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationStatement": "MedicationStatement.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/medikationsliste": "List.date", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationRequest": "authoredOn", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/Medication": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-medikation/StructureDefinition/MedicationAdministration": "MedicationAdministration.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-blut-preduktal-durch-pulsoxymetrie": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-kern": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-rektal": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-trommelfell": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorische-sauerstofffraktion-eingestellt": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/extrakorporales-verfahren": "Procedure.performed[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/systemischer-vaskulaerer-widerstandsindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutfluss-cardiovasculaeres-geraet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/horowitz-in-arteriellem-blut": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dynamische-kompliance": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontanes-atemzugvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/mechanische-atemfrequenz-beatmet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-achsel": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutdruck-generisch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/maximaler-beatmungsdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergewicht-percentil-altersabhaengig": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/exspiratorischer-sauerstoffpartialdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffgasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/zentralvenoeser-blutdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/einstellung-einatmungszeit-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemzugvolumen-waehrend-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/parameter-von-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungszeit-hohem-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/eingestellter-inspiratorischer-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/einstellung-ausatmungszeit-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/parameter-von-extrakorporalen-verfahren": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dauer-haemodialysesitzung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-stirn": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/ionisiertes-kalzium-nierenersatzverfahren": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-blut-postduktal-durch-pulsoxymetrie": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorische-sauerstofffraktion": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-gelenk": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/kopfumfang": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemfrequenz": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-herzindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumen-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergroesse": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/sauerstoffsaettigung-im-arteriellen-blut-durch-pulsoxymetrie": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/substituatvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemwegsdruck-bei-null-expiratorischem-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/zeitverhaeltnis-ein-ausatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungsvolumen-pro-minute-maschineller-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/monitoring-und-vitaldaten": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-nasen-rachen-raum": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontane-atemfrequenz-beatmet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalarterieller-wedge-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/rechtsventrikulaerer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/periphere-artierielle-sauerstoffsaettigung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksatrialer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-halswirbelsaeule": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/icu-device": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-generisch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/druckdifferenz-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/inspiratorischer-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalvaskulaerer-widerstandsindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/unterstuetzungsdruck-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemwegsdruck-bei-mittlerem-expiratorischem-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/venoeser-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergroesse-percentil": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-vaginal": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/atemzugvolumen-einstellung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/rechtsatrialer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/mittlerer-beatmungsdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/positiv-endexpiratorischer-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/herzzeitvolumen": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpergewicht": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-speiseroehre": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/substituatfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/endexpiratorischer-kohlendioxidpartialdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-leiste": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/devicemetric-eingestellte-gemessene-parameter-extrakorporale-verfahren": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-schlagvolumenindex": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmung": "Procedure.performed[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/beatmungszeit-niedrigem-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontanes-mechanisches-atemzugvolumen-waehrend-beatmung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/pulmonalarterieller-blutdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/spontane-mechanische-atemfrequenz-beatmet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/haemodialyse-blutfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-nasal": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/puls": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/dauer-extrakorporaler-gasaustausch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-harnblase": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/ideales-koerpergewicht": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-brust": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-atemwege": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutdruck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-lendenwirbelsaeule": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/exspiratorischer-gasfluss": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/arterieller-druck": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/herzfrequenz": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-herzindex-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutflussindex-extrakorporaler-gasaustausch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaerer-schlagvolumenindex-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-unter-der-zunge": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-blut": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/blutfluss-extrakorporaler-gasaustausch": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/intrakranieller-druck-icp": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/devicemetric-eingestellte-gemessene-parameter-beatmung": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/koerpertemperatur-brustwirbelsaeule": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-icu/StructureDefinition/linksventrikulaeres-herzzeitvolumen-durch-indikatorverduennung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Substance": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Organization": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/Specimen": "Specimen.collection.collected[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-biobank/StructureDefinition/SpecimenCore": "Specimen.collection.collected[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-prozedur/StructureDefinition/Procedure": "Procedure.performed[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Vitalstatus": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/PatientPseudonymisiert": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/ResearchSubject": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Patient": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/Todesursache": "Condition.recordedDate", + "http://fhir.de/ConsentManagement/StructureDefinition/DocumentReference": "DocumentReference.date", + "http://fhir.de/ConsentManagement/StructureDefinition/TemplateFrame": "", + "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-einwilligung": "Consent.dateTime", + "http://fhir.de/ConsentManagement/StructureDefinition/TemplateModule": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Domain/Organization": "", + "http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireComposed": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Domain/ResearchStudy": "", + "http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireResponse": "", + "http://fhir.de/ConsentManagement/StructureDefinition/Provenance": "Provenance.recorded", + "http://fhir.de/ConsentManagement/StructureDefinition/Patient": "", + "https://www.medizininformatik-initiative.de/fhir/core/modul-diagnose/StructureDefinition/Diagnose": "Condition.recordedDate", + "https://www.medizininformatik-initiative.de/fhir/core/modul-fall/StructureDefinition/KontaktGesundheitseinrichtung": "", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/genotyp": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/medikationsempfehlung": "Task.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/empfohlene-folgemassnahme": "Task.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/familienanamnese": "FamilyMemberHistory.date", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/ergebnis-zusammenfassung": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/molekulargenetischer-befundbericht": "DiagnosticReport.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/diagnostische-implikation": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/anforderung-genetischer-test": "ServiceRequest.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/mikrosatelliteninstabilitaet": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/mutationslast": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/variante": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/therapeutische-implikation": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/untersuchte-region": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/ext/modul-molgen/StructureDefinition/polygener-risiko-score": "RiskAssessment.occurrence[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ObservationLab": "Observation.effective[x]", + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/ServiceRequestLab": "ServiceRequest.authoredOn", + "https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab": "DiagnosticReport.effective[x]" +} \ No newline at end of file diff --git a/structureDefinitions/Profile_MII_Consent_DocumentReference.json b/structureDefinitions/Profile_MII_Consent_DocumentReference.json index e15c42a..9fa4528 100644 --- a/structureDefinitions/Profile_MII_Consent_DocumentReference.json +++ b/structureDefinitions/Profile_MII_Consent_DocumentReference.json @@ -1 +1,4134 @@ -{"resourceType":"StructureDefinition","id":"56375452-bfa1-4111-af7c-5b5ba9a1857c","url":"https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-documentreference","version":"1.0.7","name":"MII_PR_Consent_DocumentReference","title":"Profile - MI-I - Consent - DocumentReference","status":"active","date":"2023-05-09","description":"Dieses Profil beschreibt die Abbildung von Originaldokumenten zu Einwilligungen in der Medizininformatik-Initiative.\r\nDiese müssen im PDF-Format vorliegen.","fhirVersion":"4.0.1","mapping":[{"identity":"workflow","uri":"http://hl7.org/fhir/workflow","name":"Workflow Pattern"},{"identity":"fhircomposition","uri":"http://hl7.org/fhir/composition","name":"FHIR Composition"},{"identity":"rim","uri":"http://hl7.org/v3","name":"RIM Mapping"},{"identity":"cda","uri":"http://hl7.org/v3/cda","name":"CDA (R2)"},{"identity":"w5","uri":"http://hl7.org/fhir/fivews","name":"FiveWs Pattern Mapping"},{"identity":"v2","uri":"http://hl7.org/v2","name":"HL7 v2 Mapping"},{"identity":"xds","uri":"http://ihe.net/xds","name":"XDS metadata equivalent"}],"kind":"resource","abstract":false,"type":"DocumentReference","baseDefinition":"http://fhir.de/ConsentManagement/StructureDefinition/DocumentReference","derivation":"constraint","snapshot":{"element":[{"id":"DocumentReference","path":"DocumentReference","short":"A reference to a document","definition":"A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.","comment":"Usually, this is used for documents other than those defined by FHIR.","min":0,"max":"*","base":{"path":"DocumentReference","min":0,"max":"*"},"constraint":[{"key":"dom-2","severity":"error","human":"If the resource is contained in another resource, it SHALL NOT contain nested Resources","expression":"contained.contained.empty()","xpath":"not(parent::f:contained and f:contained)","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"dom-4","severity":"error","human":"If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated","expression":"contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()","xpath":"not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"dom-3","severity":"error","human":"If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource","expression":"contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()","xpath":"not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice","valueBoolean":true},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation","valueMarkdown":"When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."}],"key":"dom-6","severity":"warning","human":"A resource should have narrative for robust management","expression":"text.`div`.exists()","xpath":"exists(f:text/h:div)","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"dom-5","severity":"error","human":"If a resource is contained in another resource, it SHALL NOT have a security label","expression":"contained.meta.security.empty()","xpath":"not(exists(f:contained/*/f:meta/f:security))","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"Entity. Role, or Act"},{"identity":"workflow","map":"Event"},{"identity":"fhircomposition","map":"when describing a Composition"},{"identity":"rim","map":"Document[classCode=\"DOC\" and moodCode=\"EVN\"]"},{"identity":"cda","map":"when describing a CDA"}]},{"id":"DocumentReference.id","path":"DocumentReference.id","short":"Logical id of this artifact","definition":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.","comment":"The only time that a resource does not have an id is when it is being submitted to the server using a create operation.","min":0,"max":"1","base":{"path":"Resource.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"isSummary":true},{"id":"DocumentReference.meta","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.meta","short":"Metadata about the resource","definition":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.","min":0,"max":"1","base":{"path":"Resource.meta","min":0,"max":"1"},"type":[{"code":"Meta"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.implicitRules","path":"DocumentReference.implicitRules","short":"A set of rules under which this content was created","definition":"A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.","comment":"Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.","min":0,"max":"1","base":{"path":"Resource.implicitRules","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isModifier":true,"isModifierReason":"This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"DocumentReference.language","path":"DocumentReference.language","short":"Language of the resource content","definition":"The base language in which the resource is written.","comment":"Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).","min":0,"max":"1","base":{"path":"Resource.language","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet","valueCanonical":"http://hl7.org/fhir/ValueSet/all-languages"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"Language"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"preferred","description":"A human language.","valueSet":"http://hl7.org/fhir/ValueSet/languages"},"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"DocumentReference.text","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.text","short":"Text summary of the resource, for human interpretation","definition":"A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.","comment":"Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.","alias":["narrative","html","xhtml","display"],"min":0,"max":"1","base":{"path":"DomainResource.text","min":0,"max":"1"},"type":[{"code":"Narrative"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"},{"identity":"rim","map":"Act.text?"}]},{"id":"DocumentReference.contained","path":"DocumentReference.contained","short":"Contained, inline Resources","definition":"These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.","comment":"This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.","alias":["inline resources","anonymous resources","contained resources"],"min":0,"max":"*","base":{"path":"DomainResource.contained","min":0,"max":"*"},"type":[{"code":"Resource"}],"mapping":[{"identity":"rim","map":"Entity. Role, or Act"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"DomainResource.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.modifierExtension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Extensions that cannot be ignored","definition":"May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"DomainResource.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them","mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.masterIdentifier","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.masterIdentifier","short":"Master Version Specific Identifier","definition":"Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.","comment":"CDA Document Id extension and root.","requirements":"The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64-character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form \"oid^extension\", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.).","min":0,"max":"1","base":{"path":"DocumentReference.masterIdentifier","min":0,"max":"1"},"type":[{"code":"Identifier"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX / EI (occasionally, more often EI maps to a resource id or a URL)"},{"identity":"rim","map":"II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]"},{"identity":"servd","map":"Identifier"},{"identity":"workflow","map":"Event.identifier"},{"identity":"w5","map":"FiveWs.identifier"},{"identity":"fhircomposition","map":"Composition.identifier"},{"identity":"v2","map":"TXA-12"},{"identity":"rim","map":".id"},{"identity":"xds","map":"DocumentEntry.uniqueId"},{"identity":"cda","map":"ClinicalDocument/id"}]},{"id":"DocumentReference.identifier","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.identifier","short":"Other identifiers for the document","definition":"Other identifiers associated with the document, including version independent identifiers.","min":0,"max":"*","base":{"path":"DocumentReference.identifier","min":0,"max":"*"},"type":[{"code":"Identifier"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX / EI (occasionally, more often EI maps to a resource id or a URL)"},{"identity":"rim","map":"II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]"},{"identity":"servd","map":"Identifier"},{"identity":"workflow","map":"Event.identifier"},{"identity":"w5","map":"FiveWs.identifier"},{"identity":"v2","map":"TXA-16?"},{"identity":"rim","map":".id / .setId"},{"identity":"xds","map":"DocumentEntry.entryUUID"}]},{"id":"DocumentReference.status","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.status","short":"current | superseded | entered-in-error","definition":"The status of this document reference.","comment":"This is the status of the DocumentReference object, which might be independent from the docStatus element.\n\nThis element is labeled as a modifier because the status contains the codes that mark the document or reference as not currently valid.","min":1,"max":"1","base":{"path":"DocumentReference.status","min":1,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isModifier":true,"isModifierReason":"This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid","isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"DocumentReferenceStatus"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"required","description":"The status of the document reference.","valueSet":"http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"workflow","map":"Event.status"},{"identity":"w5","map":"FiveWs.status"},{"identity":"v2","map":"TXA-19"},{"identity":"rim","map":"interim: .completionCode=\"IN\" & ./statusCode[isNormalDatatype()]=\"active\"; final: .completionCode=\"AU\" && ./statusCode[isNormalDatatype()]=\"complete\" and not(./inboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()]/source[subsumesCode(\"ActClass#CACT\") and moodCode=\"EVN\" and domainMember(\"ReviseDocument\", code) and isNormalAct()]); amended: .completionCode=\"AU\" && ./statusCode[isNormalDatatype()]=\"complete\" and ./inboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()]/source[subsumesCode(\"ActClass#CACT\") and moodCode=\"EVN\" and domainMember(\"ReviseDocument\", code) and isNormalAct() and statusCode=\"completed\"]; withdrawn : .completionCode=NI && ./statusCode[isNormalDatatype()]=\"obsolete\""},{"identity":"xds","map":"DocumentEntry.availabilityStatus"}]},{"id":"DocumentReference.docStatus","path":"DocumentReference.docStatus","short":"preliminary | final | amended | entered-in-error","definition":"The status of the underlying document.","comment":"The document that is pointed to might be in various lifecycle states.","min":0,"max":"1","base":{"path":"DocumentReference.docStatus","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ReferredDocumentStatus"}],"strength":"required","description":"Status of the underlying document.","valueSet":"http://hl7.org/fhir/ValueSet/composition-status|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"w5","map":"FiveWs.status"},{"identity":"fhircomposition","map":"Composition.status"},{"identity":"v2","map":"TXA-17"},{"identity":"rim","map":".statusCode"}]},{"id":"DocumentReference.type","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.type","short":"Kind of document (LOINC if possible)","definition":"Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.","comment":"Key metadata element describing the document that describes he exact type of document. Helps humans to assess whether the document is of interest when viewing a list of documents.","min":0,"max":"1","base":{"path":"DocumentReference.type","min":0,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"DocumentC80Type"}],"strength":"preferred","description":"Precise type of clinical document.","valueSet":"http://hl7.org/fhir/ValueSet/c80-doc-typecodes"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"workflow","map":"Event.code"},{"identity":"w5","map":"FiveWs.class"},{"identity":"fhircomposition","map":"Composition.type"},{"identity":"v2","map":"TXA-2"},{"identity":"rim","map":"./code"},{"identity":"xds","map":"DocumentEntry.type"},{"identity":"cda","map":"ClinicalDocument/code/@code \n\nThe typeCode should be mapped from the ClinicalDocument/code element to a set of document type codes configured in the affinity domain. One suggested coding system to use for typeCode is LOINC, in which case the mapping step can be omitted."}]},{"id":"DocumentReference.category","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.category","short":"Categorization of document","definition":"A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.","comment":"Key metadata element describing the the category or classification of the document. This is a broader perspective that groups similar documents based on how they would be used. This is a primary key used in searching.","alias":["claxs"],"min":0,"max":"*","base":{"path":"DocumentReference.category","min":0,"max":"*"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"DocumentC80Class"}],"strength":"example","description":"High-level kind of a clinical document at a macro level.","valueSet":"http://hl7.org/fhir/ValueSet/document-classcodes"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"w5","map":"FiveWs.class"},{"identity":"fhircomposition","map":"Composition.class"},{"identity":"rim","map":".outboundRelationship[typeCode=\"COMP].target[classCode=\"LIST\", moodCode=\"EVN\"].code"},{"identity":"xds","map":"DocumentEntry.class"},{"identity":"cda","map":"Derived from a mapping of /ClinicalDocument/code/@code to an Affinity Domain specified coded value to use and coding system. Affinity Domains are encouraged to use the appropriate value for Type of Service, based on the LOINC Type of Service (see Page 53 of the LOINC User's Manual). Must be consistent with /ClinicalDocument/code/@code"}]},{"id":"DocumentReference.subject","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.subject","short":"Who/what is the subject of the document","definition":"Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":1,"max":"1","base":{"path":"DocumentReference.subject","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://fhir.de/ConsentManagement/StructureDefinition/Patient"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.subject"},{"identity":"w5","map":"FiveWs.subject[x]"},{"identity":"fhircomposition","map":"Composition.subject"},{"identity":"v2","map":"PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)"},{"identity":"rim","map":".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]"},{"identity":"xds","map":"DocumentEntry.patientId"},{"identity":"cda","map":"ClinicalDocument/recordTarget/"},{"identity":"w5","map":"FiveWs.subject"}]},{"id":"DocumentReference.subject.id","path":"DocumentReference.subject.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"DocumentReference.subject.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.subject.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.subject.reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.subject.reference","short":"Literal reference, Relative, internal or absolute URL","definition":"A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.","comment":"Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.","min":0,"max":"1","base":{"path":"Reference.reference","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1","ref-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.subject.type","path":"DocumentReference.subject.type","short":"Type the reference refers to (e.g. \"Patient\")","definition":"The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).","comment":"This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.","min":0,"max":"1","base":{"path":"Reference.type","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"FHIRResourceTypeExt"}],"strength":"extensible","description":"Aa resource (or, for logical models, the URI of the logical model).","valueSet":"http://hl7.org/fhir/ValueSet/resource-types"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.subject.identifier","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.subject.identifier","short":"Logical reference, when literal reference is not known","definition":"An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.","comment":"When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).","min":0,"max":"1","base":{"path":"Reference.identifier","min":0,"max":"1"},"type":[{"code":"Identifier"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX / EI (occasionally, more often EI maps to a resource id or a URL)"},{"identity":"rim","map":"II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]"},{"identity":"servd","map":"Identifier"},{"identity":"rim","map":".identifier"}]},{"id":"DocumentReference.subject.display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"DocumentReference.subject.display","short":"Text alternative for the resource","definition":"Plain text narrative that identifies the resource in addition to the resource reference.","comment":"This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.","min":0,"max":"1","base":{"path":"Reference.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.date","path":"DocumentReference.date","short":"When this document reference was created","definition":"When the document reference was created.","comment":"Referencing/indexing time is used for tracking, organizing versions and searching.","alias":["indexed"],"min":0,"max":"1","base":{"path":"DocumentReference.date","min":0,"max":"1"},"type":[{"code":"instant"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"workflow","map":"Event.occurrence[x]"},{"identity":"w5","map":"FiveWs.recorded"},{"identity":"fhircomposition","map":"Composition.date"},{"identity":"rim","map":".availabilityTime[type=\"TS\"]"}]},{"id":"DocumentReference.author","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.author","short":"Who and/or what authored the document","definition":"Identifies who is responsible for adding the information to the document.","comment":"Not necessarily who did the actual data entry (i.e. typist) or who was the source (informant).","min":0,"max":"*","base":{"path":"DocumentReference.author","min":0,"max":"*"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/Organization","http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/RelatedPerson"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.performer.actor"},{"identity":"fhircomposition","map":"Composition.author"},{"identity":"v2","map":"TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)"},{"identity":"rim","map":".participation[typeCode=\"AUT\"].role[classCode=\"ASSIGNED\"]"},{"identity":"xds","map":"DocumentEntry.author"},{"identity":"cda","map":"ClinicalDocument/author"}]},{"id":"DocumentReference.authenticator","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.authenticator","short":"Who/what authenticated the document","definition":"Which person or organization authenticates that this document is valid.","comment":"Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator.","min":0,"max":"1","base":{"path":"DocumentReference.authenticator","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/Organization"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.performer.actor"},{"identity":"w5","map":"FiveWs.witness"},{"identity":"fhircomposition","map":"Composition.attester"},{"identity":"v2","map":"TXA-10"},{"identity":"rim","map":".participation[typeCode=\"AUTHEN\"].role[classCode=\"ASSIGNED\"]"},{"identity":"xds","map":"DocumentEntry.legalAuthenticator"},{"identity":"cda","map":"ClinicalDocument/legalAuthenticator"}]},{"id":"DocumentReference.custodian","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.custodian","short":"Organization which maintains the document","definition":"Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.","comment":"Identifies the logical organization (software system, vendor, or department) to go to find the current version, where to report issues, etc. This is different from the physical location (URL, disk drive, or server) of the document, which is the technical location of the document, which host may be delegated to the management of some other organization.","min":0,"max":"1","base":{"path":"DocumentReference.custodian","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Organization"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.performer.actor"},{"identity":"fhircomposition","map":"Composition.custodian"},{"identity":"rim","map":".participation[typeCode=\"RCV\"].role[classCode=\"CUST\"].scoper[classCode=\"ORG\" and determinerCode=\"INST\"]"}]},{"id":"DocumentReference.relatesTo","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.relatesTo","short":"Relationships to other documents","definition":"Relationships that this document has with other document references that already exist.","comment":"This element is labeled as a modifier because documents that append to other documents are incomplete on their own.","min":0,"max":"*","base":{"path":"DocumentReference.relatesTo","min":0,"max":"*"},"type":[{"code":"BackboneElement"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"fhircomposition","map":"Composition.relatesTo"},{"identity":"rim","map":".outboundRelationship"},{"identity":"xds","map":"DocumentEntry Associations"}]},{"id":"DocumentReference.relatesTo.id","path":"DocumentReference.relatesTo.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"DocumentReference.relatesTo.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.relatesTo.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.relatesTo.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.relatesTo.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.relatesTo.code","path":"DocumentReference.relatesTo.code","short":"replaces | transforms | signs | appends","definition":"The type of relationship that this document has with anther document.","comment":"If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.","min":1,"max":"1","base":{"path":"DocumentReference.relatesTo.code","min":1,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"DocumentRelationshipType"}],"strength":"required","description":"The type of relationship between documents.","valueSet":"http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"fhircomposition","map":"Composition.relatesTo.code"},{"identity":"rim","map":".outboundRelationship.typeCode"},{"identity":"xds","map":"DocumentEntry Associations type"}]},{"id":"DocumentReference.relatesTo.target","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.relatesTo.target","short":"Target of the relationship","definition":"The target document of this relationship.","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":1,"max":"1","base":{"path":"DocumentReference.relatesTo.target","min":1,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/DocumentReference"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"fhircomposition","map":"Composition.relatesTo.target"},{"identity":"rim","map":".target[classCode=\"DOC\", moodCode=\"EVN\"].id"},{"identity":"xds","map":"DocumentEntry Associations reference"}]},{"id":"DocumentReference.description","path":"DocumentReference.description","short":"Human-readable description","definition":"Human-readable description of the source document.","comment":"What the document is about, a terse summary of the document.","requirements":"Helps humans to assess whether the document is of interest.","min":0,"max":"1","base":{"path":"DocumentReference.description","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"TXA-25"},{"identity":"rim","map":".outboundRelationship[typeCode=\"SUBJ\"].target.text"},{"identity":"xds","map":"DocumentEntry.comments"}]},{"id":"DocumentReference.securityLabel","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.securityLabel","short":"Document security-tags","definition":"A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.","comment":"The confidentiality codes can carry multiple vocabulary items. HL7 has developed an understanding of security and privacy tags that might be desirable in a Document Sharing environment, called HL7 Healthcare Privacy and Security Classification System (HCS). The following specification is recommended but not mandated, as the vocabulary bindings are an administrative domain responsibility. The use of this method is up to the policy domain such as the XDS Affinity Domain or other Trust Domain where all parties including sender and recipients are trusted to appropriately tag and enforce. \n\nIn the HL7 Healthcare Privacy and Security Classification (HCS) there are code systems specific to Confidentiality, Sensitivity, Integrity, and Handling Caveats. Some values would come from a local vocabulary as they are related to workflow roles and special projects.","requirements":"Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended.","min":0,"max":"*","base":{"path":"DocumentReference.securityLabel","min":0,"max":"*"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"SecurityLabels"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"extensible","description":"Security Labels from the Healthcare Privacy and Security Classification System.","valueSet":"http://hl7.org/fhir/ValueSet/security-labels"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"fhircomposition","map":"Composition.confidentiality, Composition.meta.security"},{"identity":"v2","map":"TXA-18"},{"identity":"rim","map":".confidentialityCode"},{"identity":"xds","map":"DocumentEntry.confidentialityCode"},{"identity":"cda","map":"ClinicalDocument/confidentialityCode/@code"}]},{"id":"DocumentReference.content","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.content","short":"Document referenced","definition":"The document and format referenced. There may be multiple content element repetitions, each with a different format.","min":1,"max":"*","base":{"path":"DocumentReference.content","min":1,"max":"*"},"type":[{"code":"BackboneElement"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"fhircomposition","map":"Bundle(Composition+*)"},{"identity":"rim","map":"document.text"}]},{"id":"DocumentReference.content.id","path":"DocumentReference.content.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"DocumentReference.content.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.content.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.content.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.content.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.content.attachment","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.content.attachment","short":"Where to access the document","definition":"The document or URL of the document along with critical metadata to prove content has integrity.","comment":"When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as \"Signed Procedure Consent\".","min":1,"max":"1","base":{"path":"DocumentReference.content.attachment","min":1,"max":"1"},"type":[{"code":"Attachment"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"att-1","severity":"error","human":"If the Attachment has data, it SHALL have a contentType","expression":"data.empty() or contentType.exists()","xpath":"not(exists(f:data)) or exists(f:contentType)","source":"http://hl7.org/fhir/StructureDefinition/DocumentReference"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"ED/RP"},{"identity":"rim","map":"ED"},{"identity":"fhircomposition","map":"Composition.language, \nComposition.title, \nComposition.date"},{"identity":"v2","map":"TXA-3 for mime type"},{"identity":"rim","map":"document.text"},{"identity":"xds","map":"DocumentEntry.mimeType, DocumentEntry.languageCode, DocumentEntry.URI, DocumentEntry.size, DocumentEntry.hash, DocumentEntry.title, DocumentEntry.creationTime"},{"identity":"cda","map":"ClinicalDocument/languageCode, ClinicalDocument/title, ClinicalDocument/date"}]},{"id":"DocumentReference.content.attachment.id","path":"DocumentReference.content.attachment.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"DocumentReference.content.attachment.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.content.attachment.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.content.attachment.contentType","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.content.attachment.contentType","short":"Mime type of the content, with charset etc.","definition":"Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Processors of the data need to be able to know how to interpret the data.","min":1,"max":"1","base":{"path":"Attachment.contentType","min":0,"max":"1"},"type":[{"code":"code"}],"patternCode":"application/pdf","example":[{"label":"General","valueCode":"text/plain; charset=UTF-8, image/png"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"MimeType"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"required","description":"The mime type of an attachment. Any valid mime type is allowed.","valueSet":"http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used"},{"identity":"rim","map":"./mediaType, ./charset"}]},{"id":"DocumentReference.content.attachment.language","path":"DocumentReference.content.attachment.language","short":"Human language of the content (BCP-47)","definition":"The human language of the content. The value can be any valid value according to BCP 47.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Users need to be able to choose between the languages in a set of attachments.","min":0,"max":"1","base":{"path":"Attachment.language","min":0,"max":"1"},"type":[{"code":"code"}],"example":[{"label":"General","valueCode":"en-AU"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet","valueCanonical":"http://hl7.org/fhir/ValueSet/all-languages"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"Language"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"preferred","description":"A human language.","valueSet":"http://hl7.org/fhir/ValueSet/languages"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"./language"}]},{"id":"DocumentReference.content.attachment.data","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.content.attachment.data","short":"Data inline, base64ed","definition":"The actual data of the attachment - a sequence of bytes, base64 encoded.","comment":"The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.","requirements":"The data needs to able to be transmitted inline.","min":1,"max":"1","base":{"path":"Attachment.data","min":0,"max":"1"},"type":[{"code":"base64Binary"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"ED.5"},{"identity":"rim","map":"./data"}]},{"id":"DocumentReference.content.attachment.url","path":"DocumentReference.content.attachment.url","short":"Uri where the data can be found","definition":"A location where the data can be accessed.","comment":"If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.","requirements":"The data needs to be transmitted by reference.","min":0,"max":"1","base":{"path":"Attachment.url","min":0,"max":"1"},"type":[{"code":"url"}],"example":[{"label":"General","valueUrl":"http://www.acme.com/logo-small.png"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"RP.1+RP.2 - if they refer to a URL (see v2.6)"},{"identity":"rim","map":"./reference/literal"}]},{"id":"DocumentReference.content.attachment.size","path":"DocumentReference.content.attachment.size","short":"Number of bytes of content (if url provided)","definition":"The number of bytes of data that make up this attachment (before base64 encoding, if that is done).","comment":"The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.","requirements":"Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.","min":0,"max":"1","base":{"path":"Attachment.size","min":0,"max":"1"},"type":[{"code":"unsignedInt"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A (needs data type R3 proposal)"}]},{"id":"DocumentReference.content.attachment.hash","path":"DocumentReference.content.attachment.hash","short":"Hash of the data (sha-1, base64ed)","definition":"The calculated hash of the data using SHA-1. Represented using base64.","comment":"The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature.","requirements":"Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).","min":0,"max":"1","base":{"path":"Attachment.hash","min":0,"max":"1"},"type":[{"code":"base64Binary"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]"}]},{"id":"DocumentReference.content.attachment.title","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"DocumentReference.content.attachment.title","short":"Label to display in place of the data","definition":"A label or set of text to display in place of the data.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer.","min":0,"max":"1","base":{"path":"Attachment.title","min":0,"max":"1"},"type":[{"code":"string"}],"example":[{"label":"General","valueString":"Official Corporate Logo"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"./title/data"}]},{"id":"DocumentReference.content.attachment.creation","path":"DocumentReference.content.attachment.creation","short":"Date attachment was first created","definition":"The date that the attachment was first created.","requirements":"This is often tracked as an integrity issue for use of the attachment.","min":0,"max":"1","base":{"path":"Attachment.creation","min":0,"max":"1"},"type":[{"code":"dateTime"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A (needs data type R3 proposal)"}]},{"id":"DocumentReference.content.format","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.content.format","short":"Format/content rules for the document","definition":"An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.","comment":"Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI.","min":0,"max":"1","base":{"path":"DocumentReference.content.format","min":0,"max":"1"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"DocumentFormat"}],"strength":"preferred","description":"Document Format Codes.","valueSet":"http://hl7.org/fhir/ValueSet/formatcodes"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"},{"identity":"fhircomposition","map":"Composition.meta.profile"},{"identity":"rim","map":"document.text"},{"identity":"xds","map":"DocumentEntry.formatCode"},{"identity":"cda","map":"derived from the IHE Profile or Implementation Guide templateID"}]},{"id":"DocumentReference.context","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context","short":"Clinical context of document","definition":"The clinical context in which the document was prepared.","comment":"These values are primarily added to help with searching for interesting/relevant documents.","min":0,"max":"1","base":{"path":"DocumentReference.context","min":0,"max":"1"},"type":[{"code":"BackboneElement"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"outboundRelationship[typeCode=\"SUBJ\"].target[classCode<'ACT']"}]},{"id":"DocumentReference.context.id","path":"DocumentReference.context.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"DocumentReference.context.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.context.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"DocumentReference.context.encounter","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context.encounter","short":"Context of the document content","definition":"Describes the clinical encounter or type of care that the document content is associated with.","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":0,"max":"*","base":{"path":"DocumentReference.context.encounter","min":0,"max":"*"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Encounter","http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.context"},{"identity":"w5","map":"FiveWs.context"},{"identity":"fhircomposition","map":"Composition.encounter"},{"identity":"rim","map":"unique(highest(./outboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()], priorityNumber)/target[moodCode=\"EVN\" and classCode=(\"ENC\", \"PCPR\") and isNormalAct])"}]},{"id":"DocumentReference.context.event","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context.event","short":"Main clinical acts documented","definition":"This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.","comment":"An event can further specialize the act inherent in the type, such as where it is simply \"Procedure Report\" and the procedure was a \"colonoscopy\". If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation.","min":0,"max":"*","base":{"path":"DocumentReference.context.event","min":0,"max":"*"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"DocumentEventType"}],"strength":"example","description":"This list of codes represents the main clinical acts being documented.","valueSet":"http://terminology.hl7.org/ValueSet/v3-ActCode"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"fhircomposition","map":"Composition.event.code"},{"identity":"rim","map":".code"},{"identity":"xds","map":"DocumentEntry.eventCodeList"}]},{"id":"DocumentReference.context.period","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context.period","short":"Time of service that is being documented","definition":"The time period over which the service that is described by the document was provided.","comment":"A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).","min":0,"max":"1","base":{"path":"DocumentReference.context.period","min":0,"max":"1"},"type":[{"code":"Period"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"per-1","severity":"error","human":"If present, start SHALL have a lower value than end","expression":"start.hasValue().not() or end.hasValue().not() or (start <= end)","xpath":"not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))","source":"http://hl7.org/fhir/StructureDefinition/Consent"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR"},{"identity":"rim","map":"IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]"},{"identity":"fhircomposition","map":"Composition.event.period"},{"identity":"rim","map":".effectiveTime"},{"identity":"xds","map":"DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime"},{"identity":"cda","map":"ClinicalDocument/documentationOf/\nserviceEvent/effectiveTime/low/\n@value --> ClinicalDocument/documentationOf/\nserviceEvent/effectiveTime/high/\n@value"}]},{"id":"DocumentReference.context.facilityType","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context.facilityType","short":"Kind of facility where patient was seen","definition":"The kind of facility where the patient was seen.","comment":"Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.","min":0,"max":"1","base":{"path":"DocumentReference.context.facilityType","min":0,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"DocumentC80FacilityType"}],"strength":"example","description":"XDS Facility Type.","valueSet":"http://hl7.org/fhir/ValueSet/c80-facilitycodes"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"fhircomposition","map":"usually from a mapping to a local ValueSet"},{"identity":"rim","map":".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code"},{"identity":"xds","map":"DocumentEntry.healthcareFacilityTypeCode"},{"identity":"cda","map":"usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code"}]},{"id":"DocumentReference.context.practiceSetting","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context.practiceSetting","short":"Additional details about where the content was created (e.g. clinical specialty)","definition":"This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.","comment":"This element should be based on a coarse classification system for the class of specialty practice. Recommend the use of the classification system for Practice Setting, such as that described by the Subject Matter Domain in LOINC.","requirements":"This is an important piece of metadata that providers often rely upon to quickly sort and/or filter out to find specific content.","min":0,"max":"1","base":{"path":"DocumentReference.context.practiceSetting","min":0,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"DocumentC80PracticeSetting"}],"strength":"example","description":"Additional details about where the content was created (e.g. clinical specialty).","valueSet":"http://hl7.org/fhir/ValueSet/c80-practice-codes"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"fhircomposition","map":"usually from a mapping to a local ValueSet"},{"identity":"rim","map":".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code"},{"identity":"xds","map":"DocumentEntry.practiceSettingCode"},{"identity":"cda","map":"usually from a mapping to a local ValueSet"}]},{"id":"DocumentReference.context.sourcePatientInfo","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context.sourcePatientInfo","short":"Patient demographics from source","definition":"The Patient Information as known when the document was published. May be a reference to a version specific, or contained.","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":0,"max":"1","base":{"path":"DocumentReference.context.sourcePatientInfo","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Patient"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"fhircomposition","map":"Composition.subject"},{"identity":"rim","map":".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]"},{"identity":"xds","map":"DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId"},{"identity":"cda","map":"ClinicalDocument/recordTarget/"}]},{"id":"DocumentReference.context.related","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"DocumentReference.context.related","short":"Related identifiers or resources","definition":"Related identifiers or resources associated with the DocumentReference.","comment":"May be identifiers or resources that caused the DocumentReference or referenced Document to be created.","min":0,"max":"*","base":{"path":"DocumentReference.context.related","min":0,"max":"*"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Resource"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"fhircomposition","map":"Composition.event.detail"},{"identity":"rim","map":"./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct]"},{"identity":"xds","map":"DocumentEntry.referenceIdList"},{"identity":"cda","map":"ClinicalDocument/relatedDocument"}]}]},"differential":{"element":[{"id":"DocumentReference.content.attachment.contentType","path":"DocumentReference.content.attachment.contentType","patternCode":"application/pdf"}]}} \ No newline at end of file +{ + "resourceType": "StructureDefinition", + "id": "56375452-bfa1-4111-af7c-5b5ba9a1857c", + "url": "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-documentreference", + "version": "1.0.7", + "name": "MII_PR_Consent_DocumentReference", + "title": "Profile - MI-I - Consent - DocumentReference", + "status": "active", + "date": "2023-05-09", + "description": "Dieses Profil beschreibt die Abbildung von Originaldokumenten zu Einwilligungen in der Medizininformatik-Initiative.\r\nDiese müssen im PDF-Format vorliegen.", + "fhirVersion": "4.0.1", + "mapping": [ + { + "identity": "workflow", + "uri": "http://hl7.org/fhir/workflow", + "name": "Workflow Pattern" + }, + { + "identity": "fhircomposition", + "uri": "http://hl7.org/fhir/composition", + "name": "FHIR Composition" + }, + { + "identity": "rim", + "uri": "http://hl7.org/v3", + "name": "RIM Mapping" + }, + { + "identity": "cda", + "uri": "http://hl7.org/v3/cda", + "name": "CDA (R2)" + }, + { + "identity": "w5", + "uri": "http://hl7.org/fhir/fivews", + "name": "FiveWs Pattern Mapping" + }, + { + "identity": "v2", + "uri": "http://hl7.org/v2", + "name": "HL7 v2 Mapping" + }, + { + "identity": "xds", + "uri": "http://ihe.net/xds", + "name": "XDS metadata equivalent" + } + ], + "kind": "resource", + "abstract": false, + "type": "DocumentReference", + "baseDefinition": "http://fhir.de/ConsentManagement/StructureDefinition/DocumentReference", + "derivation": "constraint", + "snapshot": { + "element": [ + { + "id": "DocumentReference", + "path": "DocumentReference", + "short": "A reference to a document", + "definition": "A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.", + "comment": "Usually, this is used for documents other than those defined by FHIR.", + "min": 0, + "max": "*", + "base": { + "path": "DocumentReference", + "min": 0, + "max": "*" + }, + "constraint": [ + { + "key": "dom-2", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", + "expression": "contained.contained.empty()", + "xpath": "not(parent::f:contained and f:contained)", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-4", + "severity": "error", + "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", + "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", + "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-3", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource", + "expression": "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()", + "xpath": "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", + "valueBoolean": true + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", + "valueMarkdown": "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time." + } + ], + "key": "dom-6", + "severity": "warning", + "human": "A resource should have narrative for robust management", + "expression": "text.`div`.exists()", + "xpath": "exists(f:text/h:div)", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-5", + "severity": "error", + "human": "If a resource is contained in another resource, it SHALL NOT have a security label", + "expression": "contained.meta.security.empty()", + "xpath": "not(exists(f:contained/*/f:meta/f:security))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "Entity. Role, or Act" + }, + { + "identity": "workflow", + "map": "Event" + }, + { + "identity": "fhircomposition", + "map": "when describing a Composition" + }, + { + "identity": "rim", + "map": "Document[classCode=\"DOC\" and moodCode=\"EVN\"]" + }, + { + "identity": "cda", + "map": "when describing a CDA" + } + ] + }, + { + "id": "DocumentReference.id", + "path": "DocumentReference.id", + "short": "Logical id of this artifact", + "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", + "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "isSummary": true + }, + { + "id": "DocumentReference.meta", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.meta", + "short": "Metadata about the resource", + "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.meta", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Meta" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.implicitRules", + "path": "DocumentReference.implicitRules", + "short": "A set of rules under which this content was created", + "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", + "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.implicitRules", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": true, + "isModifierReason": "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "DocumentReference.language", + "path": "DocumentReference.language", + "short": "Language of the resource content", + "definition": "The base language in which the resource is written.", + "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).", + "min": 0, + "max": "1", + "base": { + "path": "Resource.language", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", + "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "Language" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "preferred", + "description": "A human language.", + "valueSet": "http://hl7.org/fhir/ValueSet/languages" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "DocumentReference.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.text", + "short": "Text summary of the resource, for human interpretation", + "definition": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.", + "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.", + "alias": [ + "narrative", + "html", + "xhtml", + "display" + ], + "min": 0, + "max": "1", + "base": { + "path": "DomainResource.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Narrative" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + }, + { + "identity": "rim", + "map": "Act.text?" + } + ] + }, + { + "id": "DocumentReference.contained", + "path": "DocumentReference.contained", + "short": "Contained, inline Resources", + "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.", + "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.", + "alias": [ + "inline resources", + "anonymous resources", + "contained resources" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.contained", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Resource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "Entity. Role, or Act" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.modifierExtension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Extensions that cannot be ignored", + "definition": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.masterIdentifier", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.masterIdentifier", + "short": "Master Version Specific Identifier", + "definition": "Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.", + "comment": "CDA Document Id extension and root.", + "requirements": "The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64-character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form \"oid^extension\", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.).", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.masterIdentifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "workflow", + "map": "Event.identifier" + }, + { + "identity": "w5", + "map": "FiveWs.identifier" + }, + { + "identity": "fhircomposition", + "map": "Composition.identifier" + }, + { + "identity": "v2", + "map": "TXA-12" + }, + { + "identity": "rim", + "map": ".id" + }, + { + "identity": "xds", + "map": "DocumentEntry.uniqueId" + }, + { + "identity": "cda", + "map": "ClinicalDocument/id" + } + ] + }, + { + "id": "DocumentReference.identifier", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.identifier", + "short": "Other identifiers for the document", + "definition": "Other identifiers associated with the document, including version independent identifiers.", + "min": 0, + "max": "*", + "base": { + "path": "DocumentReference.identifier", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "workflow", + "map": "Event.identifier" + }, + { + "identity": "w5", + "map": "FiveWs.identifier" + }, + { + "identity": "v2", + "map": "TXA-16?" + }, + { + "identity": "rim", + "map": ".id / .setId" + }, + { + "identity": "xds", + "map": "DocumentEntry.entryUUID" + } + ] + }, + { + "id": "DocumentReference.status", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.status", + "short": "current | superseded | entered-in-error", + "definition": "The status of this document reference.", + "comment": "This is the status of the DocumentReference object, which might be independent from the docStatus element.\n\nThis element is labeled as a modifier because the status contains the codes that mark the document or reference as not currently valid.", + "min": 1, + "max": "1", + "base": { + "path": "DocumentReference.status", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isModifier": true, + "isModifierReason": "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid", + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "DocumentReferenceStatus" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "required", + "description": "The status of the document reference.", + "valueSet": "http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "workflow", + "map": "Event.status" + }, + { + "identity": "w5", + "map": "FiveWs.status" + }, + { + "identity": "v2", + "map": "TXA-19" + }, + { + "identity": "rim", + "map": "interim: .completionCode=\"IN\" & ./statusCode[isNormalDatatype()]=\"active\"; final: .completionCode=\"AU\" && ./statusCode[isNormalDatatype()]=\"complete\" and not(./inboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()]/source[subsumesCode(\"ActClass#CACT\") and moodCode=\"EVN\" and domainMember(\"ReviseDocument\", code) and isNormalAct()]); amended: .completionCode=\"AU\" && ./statusCode[isNormalDatatype()]=\"complete\" and ./inboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()]/source[subsumesCode(\"ActClass#CACT\") and moodCode=\"EVN\" and domainMember(\"ReviseDocument\", code) and isNormalAct() and statusCode=\"completed\"]; withdrawn : .completionCode=NI && ./statusCode[isNormalDatatype()]=\"obsolete\"" + }, + { + "identity": "xds", + "map": "DocumentEntry.availabilityStatus" + } + ] + }, + { + "id": "DocumentReference.docStatus", + "path": "DocumentReference.docStatus", + "short": "preliminary | final | amended | entered-in-error", + "definition": "The status of the underlying document.", + "comment": "The document that is pointed to might be in various lifecycle states.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.docStatus", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ReferredDocumentStatus" + } + ], + "strength": "required", + "description": "Status of the underlying document.", + "valueSet": "http://hl7.org/fhir/ValueSet/composition-status|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "w5", + "map": "FiveWs.status" + }, + { + "identity": "fhircomposition", + "map": "Composition.status" + }, + { + "identity": "v2", + "map": "TXA-17" + }, + { + "identity": "rim", + "map": ".statusCode" + } + ] + }, + { + "id": "DocumentReference.type", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.type", + "short": "Kind of document (LOINC if possible)", + "definition": "Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.", + "comment": "Key metadata element describing the document that describes he exact type of document. Helps humans to assess whether the document is of interest when viewing a list of documents.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "DocumentC80Type" + } + ], + "strength": "preferred", + "description": "Precise type of clinical document.", + "valueSet": "http://hl7.org/fhir/ValueSet/c80-doc-typecodes" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "workflow", + "map": "Event.code" + }, + { + "identity": "w5", + "map": "FiveWs.class" + }, + { + "identity": "fhircomposition", + "map": "Composition.type" + }, + { + "identity": "v2", + "map": "TXA-2" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "xds", + "map": "DocumentEntry.type" + }, + { + "identity": "cda", + "map": "ClinicalDocument/code/@code \n\nThe typeCode should be mapped from the ClinicalDocument/code element to a set of document type codes configured in the affinity domain. One suggested coding system to use for typeCode is LOINC, in which case the mapping step can be omitted." + } + ] + }, + { + "id": "DocumentReference.category", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.category", + "short": "Categorization of document", + "definition": "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.", + "comment": "Key metadata element describing the the category or classification of the document. This is a broader perspective that groups similar documents based on how they would be used. This is a primary key used in searching.", + "alias": [ + "claxs" + ], + "min": 0, + "max": "*", + "base": { + "path": "DocumentReference.category", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "DocumentC80Class" + } + ], + "strength": "example", + "description": "High-level kind of a clinical document at a macro level.", + "valueSet": "http://hl7.org/fhir/ValueSet/document-classcodes" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "w5", + "map": "FiveWs.class" + }, + { + "identity": "fhircomposition", + "map": "Composition.class" + }, + { + "identity": "rim", + "map": ".outboundRelationship[typeCode=\"COMP].target[classCode=\"LIST\", moodCode=\"EVN\"].code" + }, + { + "identity": "xds", + "map": "DocumentEntry.class" + }, + { + "identity": "cda", + "map": "Derived from a mapping of /ClinicalDocument/code/@code to an Affinity Domain specified coded value to use and coding system. Affinity Domains are encouraged to use the appropriate value for Type of Service, based on the LOINC Type of Service (see Page 53 of the LOINC User's Manual). Must be consistent with /ClinicalDocument/code/@code" + } + ] + }, + { + "id": "DocumentReference.subject", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.subject", + "short": "Who/what is the subject of the document", + "definition": "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 1, + "max": "1", + "base": { + "path": "DocumentReference.subject", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Patient" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.subject" + }, + { + "identity": "w5", + "map": "FiveWs.subject[x]" + }, + { + "identity": "fhircomposition", + "map": "Composition.subject" + }, + { + "identity": "v2", + "map": "PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)" + }, + { + "identity": "rim", + "map": ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]" + }, + { + "identity": "xds", + "map": "DocumentEntry.patientId" + }, + { + "identity": "cda", + "map": "ClinicalDocument/recordTarget/" + }, + { + "identity": "w5", + "map": "FiveWs.subject" + } + ] + }, + { + "id": "DocumentReference.subject.id", + "path": "DocumentReference.subject.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "DocumentReference.subject.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.subject.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.subject.reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.subject.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.subject.type", + "path": "DocumentReference.subject.type", + "short": "Type the reference refers to (e.g. \"Patient\")", + "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + "comment": "This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "FHIRResourceTypeExt" + } + ], + "strength": "extensible", + "description": "Aa resource (or, for logical models, the URI of the logical model).", + "valueSet": "http://hl7.org/fhir/ValueSet/resource-types" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.subject.identifier", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.subject.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "DocumentReference.subject.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "DocumentReference.subject.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.date", + "path": "DocumentReference.date", + "short": "When this document reference was created", + "definition": "When the document reference was created.", + "comment": "Referencing/indexing time is used for tracking, organizing versions and searching.", + "alias": [ + "indexed" + ], + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.date", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "instant" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "workflow", + "map": "Event.occurrence[x]" + }, + { + "identity": "w5", + "map": "FiveWs.recorded" + }, + { + "identity": "fhircomposition", + "map": "Composition.date" + }, + { + "identity": "rim", + "map": ".availabilityTime[type=\"TS\"]" + } + ] + }, + { + "id": "DocumentReference.author", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.author", + "short": "Who and/or what authored the document", + "definition": "Identifies who is responsible for adding the information to the document.", + "comment": "Not necessarily who did the actual data entry (i.e. typist) or who was the source (informant).", + "min": 0, + "max": "*", + "base": { + "path": "DocumentReference.author", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole", + "http://hl7.org/fhir/StructureDefinition/Organization", + "http://hl7.org/fhir/StructureDefinition/Device", + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.performer.actor" + }, + { + "identity": "fhircomposition", + "map": "Composition.author" + }, + { + "identity": "v2", + "map": "TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)" + }, + { + "identity": "rim", + "map": ".participation[typeCode=\"AUT\"].role[classCode=\"ASSIGNED\"]" + }, + { + "identity": "xds", + "map": "DocumentEntry.author" + }, + { + "identity": "cda", + "map": "ClinicalDocument/author" + } + ] + }, + { + "id": "DocumentReference.authenticator", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.authenticator", + "short": "Who/what authenticated the document", + "definition": "Which person or organization authenticates that this document is valid.", + "comment": "Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.authenticator", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole", + "http://hl7.org/fhir/StructureDefinition/Organization" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.performer.actor" + }, + { + "identity": "w5", + "map": "FiveWs.witness" + }, + { + "identity": "fhircomposition", + "map": "Composition.attester" + }, + { + "identity": "v2", + "map": "TXA-10" + }, + { + "identity": "rim", + "map": ".participation[typeCode=\"AUTHEN\"].role[classCode=\"ASSIGNED\"]" + }, + { + "identity": "xds", + "map": "DocumentEntry.legalAuthenticator" + }, + { + "identity": "cda", + "map": "ClinicalDocument/legalAuthenticator" + } + ] + }, + { + "id": "DocumentReference.custodian", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.custodian", + "short": "Organization which maintains the document", + "definition": "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.", + "comment": "Identifies the logical organization (software system, vendor, or department) to go to find the current version, where to report issues, etc. This is different from the physical location (URL, disk drive, or server) of the document, which is the technical location of the document, which host may be delegated to the management of some other organization.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.custodian", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Organization" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.performer.actor" + }, + { + "identity": "fhircomposition", + "map": "Composition.custodian" + }, + { + "identity": "rim", + "map": ".participation[typeCode=\"RCV\"].role[classCode=\"CUST\"].scoper[classCode=\"ORG\" and determinerCode=\"INST\"]" + } + ] + }, + { + "id": "DocumentReference.relatesTo", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.relatesTo", + "short": "Relationships to other documents", + "definition": "Relationships that this document has with other document references that already exist.", + "comment": "This element is labeled as a modifier because documents that append to other documents are incomplete on their own.", + "min": 0, + "max": "*", + "base": { + "path": "DocumentReference.relatesTo", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "fhircomposition", + "map": "Composition.relatesTo" + }, + { + "identity": "rim", + "map": ".outboundRelationship" + }, + { + "identity": "xds", + "map": "DocumentEntry Associations" + } + ] + }, + { + "id": "DocumentReference.relatesTo.id", + "path": "DocumentReference.relatesTo.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "DocumentReference.relatesTo.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.relatesTo.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.relatesTo.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.relatesTo.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.relatesTo.code", + "path": "DocumentReference.relatesTo.code", + "short": "replaces | transforms | signs | appends", + "definition": "The type of relationship that this document has with anther document.", + "comment": "If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.", + "min": 1, + "max": "1", + "base": { + "path": "DocumentReference.relatesTo.code", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "DocumentRelationshipType" + } + ], + "strength": "required", + "description": "The type of relationship between documents.", + "valueSet": "http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "fhircomposition", + "map": "Composition.relatesTo.code" + }, + { + "identity": "rim", + "map": ".outboundRelationship.typeCode" + }, + { + "identity": "xds", + "map": "DocumentEntry Associations type" + } + ] + }, + { + "id": "DocumentReference.relatesTo.target", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.relatesTo.target", + "short": "Target of the relationship", + "definition": "The target document of this relationship.", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 1, + "max": "1", + "base": { + "path": "DocumentReference.relatesTo.target", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/DocumentReference" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "fhircomposition", + "map": "Composition.relatesTo.target" + }, + { + "identity": "rim", + "map": ".target[classCode=\"DOC\", moodCode=\"EVN\"].id" + }, + { + "identity": "xds", + "map": "DocumentEntry Associations reference" + } + ] + }, + { + "id": "DocumentReference.description", + "path": "DocumentReference.description", + "short": "Human-readable description", + "definition": "Human-readable description of the source document.", + "comment": "What the document is about, a terse summary of the document.", + "requirements": "Helps humans to assess whether the document is of interest.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.description", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "TXA-25" + }, + { + "identity": "rim", + "map": ".outboundRelationship[typeCode=\"SUBJ\"].target.text" + }, + { + "identity": "xds", + "map": "DocumentEntry.comments" + } + ] + }, + { + "id": "DocumentReference.securityLabel", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.securityLabel", + "short": "Document security-tags", + "definition": "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.", + "comment": "The confidentiality codes can carry multiple vocabulary items. HL7 has developed an understanding of security and privacy tags that might be desirable in a Document Sharing environment, called HL7 Healthcare Privacy and Security Classification System (HCS). The following specification is recommended but not mandated, as the vocabulary bindings are an administrative domain responsibility. The use of this method is up to the policy domain such as the XDS Affinity Domain or other Trust Domain where all parties including sender and recipients are trusted to appropriately tag and enforce. \n\nIn the HL7 Healthcare Privacy and Security Classification (HCS) there are code systems specific to Confidentiality, Sensitivity, Integrity, and Handling Caveats. Some values would come from a local vocabulary as they are related to workflow roles and special projects.", + "requirements": "Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended.", + "min": 0, + "max": "*", + "base": { + "path": "DocumentReference.securityLabel", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "SecurityLabels" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "extensible", + "description": "Security Labels from the Healthcare Privacy and Security Classification System.", + "valueSet": "http://hl7.org/fhir/ValueSet/security-labels" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "fhircomposition", + "map": "Composition.confidentiality, Composition.meta.security" + }, + { + "identity": "v2", + "map": "TXA-18" + }, + { + "identity": "rim", + "map": ".confidentialityCode" + }, + { + "identity": "xds", + "map": "DocumentEntry.confidentialityCode" + }, + { + "identity": "cda", + "map": "ClinicalDocument/confidentialityCode/@code" + } + ] + }, + { + "id": "DocumentReference.content", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.content", + "short": "Document referenced", + "definition": "The document and format referenced. There may be multiple content element repetitions, each with a different format.", + "min": 1, + "max": "*", + "base": { + "path": "DocumentReference.content", + "min": 1, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "fhircomposition", + "map": "Bundle(Composition+*)" + }, + { + "identity": "rim", + "map": "document.text" + } + ] + }, + { + "id": "DocumentReference.content.id", + "path": "DocumentReference.content.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "DocumentReference.content.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.content.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.content.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.content.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.content.attachment", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.content.attachment", + "short": "Where to access the document", + "definition": "The document or URL of the document along with critical metadata to prove content has integrity.", + "comment": "When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as \"Signed Procedure Consent\".", + "min": 1, + "max": "1", + "base": { + "path": "DocumentReference.content.attachment", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Attachment" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "att-1", + "severity": "error", + "human": "If the Attachment has data, it SHALL have a contentType", + "expression": "data.empty() or contentType.exists()", + "xpath": "not(exists(f:data)) or exists(f:contentType)", + "source": "http://hl7.org/fhir/StructureDefinition/DocumentReference" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "ED/RP" + }, + { + "identity": "rim", + "map": "ED" + }, + { + "identity": "fhircomposition", + "map": "Composition.language, \nComposition.title, \nComposition.date" + }, + { + "identity": "v2", + "map": "TXA-3 for mime type" + }, + { + "identity": "rim", + "map": "document.text" + }, + { + "identity": "xds", + "map": "DocumentEntry.mimeType, DocumentEntry.languageCode, DocumentEntry.URI, DocumentEntry.size, DocumentEntry.hash, DocumentEntry.title, DocumentEntry.creationTime" + }, + { + "identity": "cda", + "map": "ClinicalDocument/languageCode, ClinicalDocument/title, ClinicalDocument/date" + } + ] + }, + { + "id": "DocumentReference.content.attachment.id", + "path": "DocumentReference.content.attachment.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "DocumentReference.content.attachment.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.content.attachment.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.content.attachment.contentType", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.content.attachment.contentType", + "short": "Mime type of the content, with charset etc.", + "definition": "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Processors of the data need to be able to know how to interpret the data.", + "min": 1, + "max": "1", + "base": { + "path": "Attachment.contentType", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "patternCode": "application/pdf", + "example": [ + { + "label": "General", + "valueCode": "text/plain; charset=UTF-8, image/png" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "MimeType" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "required", + "description": "The mime type of an attachment. Any valid mime type is allowed.", + "valueSet": "http://hl7.org/fhir/ValueSet/mimetypes|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used" + }, + { + "identity": "rim", + "map": "./mediaType, ./charset" + } + ] + }, + { + "id": "DocumentReference.content.attachment.language", + "path": "DocumentReference.content.attachment.language", + "short": "Human language of the content (BCP-47)", + "definition": "The human language of the content. The value can be any valid value according to BCP 47.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Users need to be able to choose between the languages in a set of attachments.", + "min": 0, + "max": "1", + "base": { + "path": "Attachment.language", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "example": [ + { + "label": "General", + "valueCode": "en-AU" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", + "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "Language" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "preferred", + "description": "A human language.", + "valueSet": "http://hl7.org/fhir/ValueSet/languages" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "./language" + } + ] + }, + { + "id": "DocumentReference.content.attachment.data", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.content.attachment.data", + "short": "Data inline, base64ed", + "definition": "The actual data of the attachment - a sequence of bytes, base64 encoded.", + "comment": "The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.", + "requirements": "The data needs to able to be transmitted inline.", + "min": 1, + "max": "1", + "base": { + "path": "Attachment.data", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "base64Binary" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "ED.5" + }, + { + "identity": "rim", + "map": "./data" + } + ] + }, + { + "id": "DocumentReference.content.attachment.url", + "path": "DocumentReference.content.attachment.url", + "short": "Uri where the data can be found", + "definition": "A location where the data can be accessed.", + "comment": "If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.", + "requirements": "The data needs to be transmitted by reference.", + "min": 0, + "max": "1", + "base": { + "path": "Attachment.url", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "url" + } + ], + "example": [ + { + "label": "General", + "valueUrl": "http://www.acme.com/logo-small.png" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "RP.1+RP.2 - if they refer to a URL (see v2.6)" + }, + { + "identity": "rim", + "map": "./reference/literal" + } + ] + }, + { + "id": "DocumentReference.content.attachment.size", + "path": "DocumentReference.content.attachment.size", + "short": "Number of bytes of content (if url provided)", + "definition": "The number of bytes of data that make up this attachment (before base64 encoding, if that is done).", + "comment": "The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.", + "requirements": "Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.", + "min": 0, + "max": "1", + "base": { + "path": "Attachment.size", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "unsignedInt" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A (needs data type R3 proposal)" + } + ] + }, + { + "id": "DocumentReference.content.attachment.hash", + "path": "DocumentReference.content.attachment.hash", + "short": "Hash of the data (sha-1, base64ed)", + "definition": "The calculated hash of the data using SHA-1. Represented using base64.", + "comment": "The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature.", + "requirements": "Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).", + "min": 0, + "max": "1", + "base": { + "path": "Attachment.hash", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "base64Binary" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": ".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]" + } + ] + }, + { + "id": "DocumentReference.content.attachment.title", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "DocumentReference.content.attachment.title", + "short": "Label to display in place of the data", + "definition": "A label or set of text to display in place of the data.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer.", + "min": 0, + "max": "1", + "base": { + "path": "Attachment.title", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "example": [ + { + "label": "General", + "valueString": "Official Corporate Logo" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "./title/data" + } + ] + }, + { + "id": "DocumentReference.content.attachment.creation", + "path": "DocumentReference.content.attachment.creation", + "short": "Date attachment was first created", + "definition": "The date that the attachment was first created.", + "requirements": "This is often tracked as an integrity issue for use of the attachment.", + "min": 0, + "max": "1", + "base": { + "path": "Attachment.creation", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A (needs data type R3 proposal)" + } + ] + }, + { + "id": "DocumentReference.content.format", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.content.format", + "short": "Format/content rules for the document", + "definition": "An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.", + "comment": "Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.content.format", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "DocumentFormat" + } + ], + "strength": "preferred", + "description": "Document Format Codes.", + "valueSet": "http://hl7.org/fhir/ValueSet/formatcodes" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "fhircomposition", + "map": "Composition.meta.profile" + }, + { + "identity": "rim", + "map": "document.text" + }, + { + "identity": "xds", + "map": "DocumentEntry.formatCode" + }, + { + "identity": "cda", + "map": "derived from the IHE Profile or Implementation Guide templateID" + } + ] + }, + { + "id": "DocumentReference.context", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context", + "short": "Clinical context of document", + "definition": "The clinical context in which the document was prepared.", + "comment": "These values are primarily added to help with searching for interesting/relevant documents.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.context", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "outboundRelationship[typeCode=\"SUBJ\"].target[classCode<'ACT']" + } + ] + }, + { + "id": "DocumentReference.context.id", + "path": "DocumentReference.context.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "DocumentReference.context.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.context.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "DocumentReference.context.encounter", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context.encounter", + "short": "Context of the document content", + "definition": "Describes the clinical encounter or type of care that the document content is associated with.", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 0, + "max": "*", + "base": { + "path": "DocumentReference.context.encounter", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Encounter", + "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.context" + }, + { + "identity": "w5", + "map": "FiveWs.context" + }, + { + "identity": "fhircomposition", + "map": "Composition.encounter" + }, + { + "identity": "rim", + "map": "unique(highest(./outboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()], priorityNumber)/target[moodCode=\"EVN\" and classCode=(\"ENC\", \"PCPR\") and isNormalAct])" + } + ] + }, + { + "id": "DocumentReference.context.event", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context.event", + "short": "Main clinical acts documented", + "definition": "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.", + "comment": "An event can further specialize the act inherent in the type, such as where it is simply \"Procedure Report\" and the procedure was a \"colonoscopy\". If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation.", + "min": 0, + "max": "*", + "base": { + "path": "DocumentReference.context.event", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "DocumentEventType" + } + ], + "strength": "example", + "description": "This list of codes represents the main clinical acts being documented.", + "valueSet": "http://terminology.hl7.org/ValueSet/v3-ActCode" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "fhircomposition", + "map": "Composition.event.code" + }, + { + "identity": "rim", + "map": ".code" + }, + { + "identity": "xds", + "map": "DocumentEntry.eventCodeList" + } + ] + }, + { + "id": "DocumentReference.context.period", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context.period", + "short": "Time of service that is being documented", + "definition": "The time period over which the service that is described by the document was provided.", + "comment": "A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.context.period", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Period" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "per-1", + "severity": "error", + "human": "If present, start SHALL have a lower value than end", + "expression": "start.hasValue().not() or end.hasValue().not() or (start <= end)", + "xpath": "not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR" + }, + { + "identity": "rim", + "map": "IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]" + }, + { + "identity": "fhircomposition", + "map": "Composition.event.period" + }, + { + "identity": "rim", + "map": ".effectiveTime" + }, + { + "identity": "xds", + "map": "DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime" + }, + { + "identity": "cda", + "map": "ClinicalDocument/documentationOf/\nserviceEvent/effectiveTime/low/\n@value --> ClinicalDocument/documentationOf/\nserviceEvent/effectiveTime/high/\n@value" + } + ] + }, + { + "id": "DocumentReference.context.facilityType", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context.facilityType", + "short": "Kind of facility where patient was seen", + "definition": "The kind of facility where the patient was seen.", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.context.facilityType", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "DocumentC80FacilityType" + } + ], + "strength": "example", + "description": "XDS Facility Type.", + "valueSet": "http://hl7.org/fhir/ValueSet/c80-facilitycodes" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "fhircomposition", + "map": "usually from a mapping to a local ValueSet" + }, + { + "identity": "rim", + "map": ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code" + }, + { + "identity": "xds", + "map": "DocumentEntry.healthcareFacilityTypeCode" + }, + { + "identity": "cda", + "map": "usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code" + } + ] + }, + { + "id": "DocumentReference.context.practiceSetting", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context.practiceSetting", + "short": "Additional details about where the content was created (e.g. clinical specialty)", + "definition": "This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.", + "comment": "This element should be based on a coarse classification system for the class of specialty practice. Recommend the use of the classification system for Practice Setting, such as that described by the Subject Matter Domain in LOINC.", + "requirements": "This is an important piece of metadata that providers often rely upon to quickly sort and/or filter out to find specific content.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.context.practiceSetting", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "DocumentC80PracticeSetting" + } + ], + "strength": "example", + "description": "Additional details about where the content was created (e.g. clinical specialty).", + "valueSet": "http://hl7.org/fhir/ValueSet/c80-practice-codes" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "fhircomposition", + "map": "usually from a mapping to a local ValueSet" + }, + { + "identity": "rim", + "map": ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code" + }, + { + "identity": "xds", + "map": "DocumentEntry.practiceSettingCode" + }, + { + "identity": "cda", + "map": "usually from a mapping to a local ValueSet" + } + ] + }, + { + "id": "DocumentReference.context.sourcePatientInfo", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context.sourcePatientInfo", + "short": "Patient demographics from source", + "definition": "The Patient Information as known when the document was published. May be a reference to a version specific, or contained.", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 0, + "max": "1", + "base": { + "path": "DocumentReference.context.sourcePatientInfo", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Patient" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "fhircomposition", + "map": "Composition.subject" + }, + { + "identity": "rim", + "map": ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]" + }, + { + "identity": "xds", + "map": "DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId" + }, + { + "identity": "cda", + "map": "ClinicalDocument/recordTarget/" + } + ] + }, + { + "id": "DocumentReference.context.related", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "DocumentReference.context.related", + "short": "Related identifiers or resources", + "definition": "Related identifiers or resources associated with the DocumentReference.", + "comment": "May be identifiers or resources that caused the DocumentReference or referenced Document to be created.", + "min": 0, + "max": "*", + "base": { + "path": "DocumentReference.context.related", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Resource" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "fhircomposition", + "map": "Composition.event.detail" + }, + { + "identity": "rim", + "map": "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct]" + }, + { + "identity": "xds", + "map": "DocumentEntry.referenceIdList" + }, + { + "identity": "cda", + "map": "ClinicalDocument/relatedDocument" + } + ] + } + ] + }, + "differential": { + "element": [ + { + "id": "DocumentReference.content.attachment.contentType", + "path": "DocumentReference.content.attachment.contentType", + "patternCode": "application/pdf" + } + ] + } +} \ No newline at end of file diff --git a/structureDefinitions/Profile_MII_Consent_Einwilligung.json b/structureDefinitions/Profile_MII_Consent_Einwilligung.json index 7ef8e6c..fb710e9 100644 --- a/structureDefinitions/Profile_MII_Consent_Einwilligung.json +++ b/structureDefinitions/Profile_MII_Consent_Einwilligung.json @@ -1 +1,12081 @@ -{"resourceType":"StructureDefinition","id":"e0e166b4-0f77-478d-9062-de0034d98ce0","url":"https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-einwilligung","version":"1.0.7","name":"MII_PR_Consent_Einwilligung","title":"Profile - MI-I - Consent - Einwilligung","status":"active","date":"2023-05-09","description":"Dieses Profil beschreibt eine Einwilligung in der Medizininformatik-Initiative.","fhirVersion":"4.0.1","mapping":[{"identity":"workflow","uri":"http://hl7.org/fhir/workflow","name":"Workflow Pattern"},{"identity":"v2","uri":"http://hl7.org/v2","name":"HL7 v2 Mapping"},{"identity":"rim","uri":"http://hl7.org/v3","name":"RIM Mapping"},{"identity":"w5","uri":"http://hl7.org/fhir/fivews","name":"FiveWs Pattern Mapping"}],"kind":"resource","abstract":false,"type":"Consent","baseDefinition":"http://hl7.org/fhir/StructureDefinition/Consent","derivation":"constraint","snapshot":{"element":[{"id":"Consent","path":"Consent","short":"A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time","definition":"A record of a healthcare consumer’s choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.","comment":"Broadly, there are 3 key areas of consent for patients: Consent around sharing information (aka Privacy Consent Directive - Authorization to Collect, Use, or Disclose information), consent for specific treatment, or kinds of treatment, and general advance care directives.","min":0,"max":"*","base":{"path":"Consent","min":0,"max":"*"},"constraint":[{"key":"dom-2","severity":"error","human":"If the resource is contained in another resource, it SHALL NOT contain nested Resources","expression":"contained.contained.empty()","xpath":"not(parent::f:contained and f:contained)","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"dom-4","severity":"error","human":"If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated","expression":"contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()","xpath":"not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"dom-3","severity":"error","human":"If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource","expression":"contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()","xpath":"not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice","valueBoolean":true},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation","valueMarkdown":"When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."}],"key":"dom-6","severity":"warning","human":"A resource should have narrative for robust management","expression":"text.`div`.exists()","xpath":"exists(f:text/h:div)","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"dom-5","severity":"error","human":"If a resource is contained in another resource, it SHALL NOT have a security label","expression":"contained.meta.security.empty()","xpath":"not(exists(f:contained/*/f:meta/f:security))","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"ppc-4","severity":"error","human":"IF Scope=adr, there must be a patient","expression":"patient.exists() or scope.coding.where(system='something' and code='adr').exists().not()","xpath":"exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='adr'])))","source":"http://hl7.org/fhir/StructureDefinition/Consent"},{"key":"ppc-5","severity":"error","human":"IF Scope=treatment, there must be a patient","expression":"patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not()","xpath":"exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='treatment'])))","source":"http://hl7.org/fhir/StructureDefinition/Consent"},{"key":"ppc-2","severity":"error","human":"IF Scope=privacy, there must be a patient","expression":"patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not()","xpath":"exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='patient-privacy'])))","source":"http://hl7.org/fhir/StructureDefinition/Consent"},{"key":"ppc-3","severity":"error","human":"IF Scope=research, there must be a patient","expression":"patient.exists() or scope.coding.where(system='something' and code='research').exists().not()","xpath":"exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='research'])))","source":"http://hl7.org/fhir/StructureDefinition/Consent"},{"key":"ppc-1","severity":"error","human":"Either a Policy or PolicyRule","expression":"policy.exists() or policyRule.exists()","xpath":"exists(f:policy) or exists(f:policyRule)","source":"http://hl7.org/fhir/StructureDefinition/Consent"}],"mapping":[{"identity":"rim","map":"Entity. Role, or Act"},{"identity":"workflow","map":"Event"},{"identity":"v2","map":"CON"},{"identity":"rim","map":"FinancialConsent"}]},{"id":"Consent.id","path":"Consent.id","short":"Logical id of this artifact","definition":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.","comment":"The only time that a resource does not have an id is when it is being submitted to the server using a create operation.","min":0,"max":"1","base":{"path":"Resource.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mustSupport":true,"isSummary":true},{"id":"Consent.meta","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.meta","short":"Metadata about the resource","definition":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.","min":0,"max":"1","base":{"path":"Resource.meta","min":0,"max":"1"},"type":[{"code":"Meta"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.meta.id","path":"Consent.meta.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.meta.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.meta.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.meta.versionId","path":"Consent.meta.versionId","short":"Version specific identifier","definition":"The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.","comment":"The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.","min":0,"max":"1","base":{"path":"Meta.versionId","min":0,"max":"1"},"type":[{"code":"id"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.meta.lastUpdated","path":"Consent.meta.lastUpdated","short":"When the resource version last changed","definition":"When the resource last changed - e.g. when the version changed.","comment":"This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a [read](http.html#read) interaction.","min":0,"max":"1","base":{"path":"Meta.lastUpdated","min":0,"max":"1"},"type":[{"code":"instant"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.meta.source","path":"Consent.meta.source","short":"Identifies where the resource comes from","definition":"A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.","comment":"In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. \n\nThis element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.","min":0,"max":"1","base":{"path":"Meta.source","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.meta.profile","path":"Consent.meta.profile","short":"Profiles this resource claims to conform to","definition":"A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).","comment":"It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.","min":0,"max":"*","base":{"path":"Meta.profile","min":0,"max":"*"},"type":[{"code":"canonical","targetProfile":["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.meta.security","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.meta.security","short":"Security Labels applied to this resource","definition":"Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.","comment":"The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.","min":0,"max":"*","base":{"path":"Meta.security","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"SecurityLabels"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"extensible","description":"Security Labels from the Healthcare Privacy and Security Classification System.","valueSet":"http://hl7.org/fhir/ValueSet/security-labels"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"}]},{"id":"Consent.meta.tag","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.meta.tag","short":"Tags applied to this resource","definition":"Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.","comment":"The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.","min":0,"max":"*","base":{"path":"Meta.tag","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"Tags"}],"strength":"example","description":"Codes that represent various types of tags, commonly workflow-related; e.g. \"Needs review by Dr. Jones\".","valueSet":"http://hl7.org/fhir/ValueSet/common-tags"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"}]},{"id":"Consent.implicitRules","path":"Consent.implicitRules","short":"A set of rules under which this content was created","definition":"A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.","comment":"Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.","min":0,"max":"1","base":{"path":"Resource.implicitRules","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isModifier":true,"isModifierReason":"This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.language","path":"Consent.language","short":"Language of the resource content","definition":"The base language in which the resource is written.","comment":"Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).","min":0,"max":"1","base":{"path":"Resource.language","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet","valueCanonical":"http://hl7.org/fhir/ValueSet/all-languages"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"Language"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"preferred","description":"A human language.","valueSet":"http://hl7.org/fhir/ValueSet/languages"},"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.text","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.text","short":"Text summary of the resource, for human interpretation","definition":"A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.","comment":"Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.","alias":["narrative","html","xhtml","display"],"min":0,"max":"1","base":{"path":"DomainResource.text","min":0,"max":"1"},"type":[{"code":"Narrative"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"},{"identity":"rim","map":"Act.text?"}]},{"id":"Consent.contained","path":"Consent.contained","short":"Contained, inline Resources","definition":"These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.","comment":"This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.","alias":["inline resources","anonymous resources","contained resources"],"min":0,"max":"*","base":{"path":"DomainResource.contained","min":0,"max":"*"},"type":[{"code":"Resource"}],"mapping":[{"identity":"rim","map":"Entity. Role, or Act"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"DomainResource.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension","sliceName":"domainReference","short":"Optional Extensions Element","definition":"Optional Extension Element - found in all resources.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"DomainResource.extension","min":0,"max":"*"},"type":[{"code":"Extension","profile":["http://fhir.de/ConsentManagement/StructureDefinition/DomainReference"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.id","path":"Consent.extension.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.extension:domainReference.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:domain","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension","sliceName":"domain","short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":1,"max":"1","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:domain.id","path":"Consent.extension.extension.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.extension:domainReference.extension:domain.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:domain.url","path":"Consent.extension.extension.url","representation":["xmlAttr"],"short":"identifies the meaning of the extension","definition":"Source of the definition for the extension code - a logical name or a URL.","comment":"The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.","min":1,"max":"1","base":{"path":"Extension.url","min":1,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"uri"}],"code":"http://hl7.org/fhirpath/System.String"}],"fixedUri":"domain","mapping":[{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:domain.value[x]","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.value[x]","short":"Value of extension","definition":"Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).","min":1,"max":"1","base":{"path":"Extension.value[x]","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://fhir.de/ConsentManagement/StructureDefinition/Domain/Organization","http://fhir.de/ConsentManagement/StructureDefinition/Domain/ResearchStudy"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:domain.value[x].id","path":"Consent.extension.extension.value[x].id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.extension:domainReference.extension:domain.value[x].extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.value[x].extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:domain.value[x].reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.value[x].reference","short":"Literal reference, Relative, internal or absolute URL","definition":"A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.","comment":"Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.","min":1,"max":"1","base":{"path":"Reference.reference","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1","ref-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:domain.value[x].type","path":"Consent.extension.extension.value[x].type","short":"Type the reference refers to (e.g. \"Patient\")","definition":"The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).","comment":"This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.","min":0,"max":"1","base":{"path":"Reference.type","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"FHIRResourceTypeExt"}],"strength":"extensible","description":"Aa resource (or, for logical models, the URI of the logical model).","valueSet":"http://hl7.org/fhir/ValueSet/resource-types"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:domain.value[x].identifier","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.value[x].identifier","short":"Logical reference, when literal reference is not known","definition":"An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.","comment":"When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).","min":0,"max":"1","base":{"path":"Reference.identifier","min":0,"max":"1"},"type":[{"code":"Identifier"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX / EI (occasionally, more often EI maps to a resource id or a URL)"},{"identity":"rim","map":"II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]"},{"identity":"servd","map":"Identifier"},{"identity":"rim","map":".identifier"}]},{"id":"Consent.extension:domainReference.extension:domain.value[x].display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.extension.extension.value[x].display","short":"Text alternative for the resource","definition":"Plain text narrative that identifies the resource in addition to the resource reference.","comment":"This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.","min":0,"max":"1","base":{"path":"Reference.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:status","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension","sliceName":"status","short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"1","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:status.id","path":"Consent.extension.extension.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.extension:domainReference.extension:status.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:status.url","path":"Consent.extension.extension.url","representation":["xmlAttr"],"short":"identifies the meaning of the extension","definition":"Source of the definition for the extension code - a logical name or a URL.","comment":"The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.","min":1,"max":"1","base":{"path":"Extension.url","min":1,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"uri"}],"code":"http://hl7.org/fhirpath/System.String"}],"fixedUri":"status","mapping":[{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:status.value[x]","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.value[x]","short":"Value of extension","definition":"Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).","min":1,"max":"1","base":{"path":"Extension.value[x]","min":0,"max":"1"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"strength":"required","valueSet":"http://hl7.org/fhir/ValueSet/publication-status"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:status.value[x].id","path":"Consent.extension.extension.value[x].id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.extension:domainReference.extension:status.value[x].extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.value[x].extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.extension:status.value[x].system","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.value[x].system","short":"Identity of the terminology system","definition":"The identification of the code system that defines the meaning of the symbol in the code.","comment":"The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.","requirements":"Need to be unambiguous about the source of the definition of the symbol.","min":1,"max":"1","base":{"path":"Coding.system","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.3"},{"identity":"rim","map":"./codeSystem"},{"identity":"orim","map":"fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"}]},{"id":"Consent.extension:domainReference.extension:status.value[x].version","path":"Consent.extension.extension.value[x].version","short":"Version of the system - if relevant","definition":"The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.","comment":"Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.","min":0,"max":"1","base":{"path":"Coding.version","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.7"},{"identity":"rim","map":"./codeSystemVersion"},{"identity":"orim","map":"fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"}]},{"id":"Consent.extension:domainReference.extension:status.value[x].code","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.extension.value[x].code","short":"Symbol in syntax defined by the system","definition":"A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to refer to a particular code in the system.","min":1,"max":"1","base":{"path":"Coding.code","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.1"},{"identity":"rim","map":"./code"},{"identity":"orim","map":"fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"}]},{"id":"Consent.extension:domainReference.extension:status.value[x].display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.extension.extension.value[x].display","short":"Representation defined by the system","definition":"A representation of the meaning of the code in the system, following the rules of the system.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to be able to carry a human-readable meaning of the code for readers that do not know the system.","min":0,"max":"1","base":{"path":"Coding.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.2 - but note this is not well followed"},{"identity":"rim","map":"CV.displayName"},{"identity":"orim","map":"fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"}]},{"id":"Consent.extension:domainReference.extension:status.value[x].userSelected","path":"Consent.extension.extension.value[x].userSelected","short":"If this coding was chosen directly by the user","definition":"Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).","comment":"Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.","requirements":"This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.","min":0,"max":"1","base":{"path":"Coding.userSelected","min":0,"max":"1"},"type":[{"code":"boolean"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"Sometimes implied by being first"},{"identity":"rim","map":"CD.codingRationale"},{"identity":"orim","map":"fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]"}]},{"id":"Consent.extension:domainReference.url","path":"Consent.extension.url","representation":["xmlAttr"],"short":"identifies the meaning of the extension","definition":"Source of the definition for the extension code - a logical name or a URL.","comment":"The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.","min":1,"max":"1","base":{"path":"Extension.url","min":1,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"uri"}],"code":"http://hl7.org/fhirpath/System.String"}],"fixedUri":"http://fhir.de/ConsentManagement/StructureDefinition/DomainReference","mapping":[{"identity":"rim","map":"N/A"}]},{"id":"Consent.extension:domainReference.value[x]","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.extension.value[x]","short":"Value of extension","definition":"Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).","min":0,"max":"0","base":{"path":"Extension.value[x]","min":0,"max":"1"},"type":[{"code":"base64Binary"},{"code":"boolean"},{"code":"canonical"},{"code":"code"},{"code":"date"},{"code":"dateTime"},{"code":"decimal"},{"code":"id"},{"code":"instant"},{"code":"integer"},{"code":"markdown"},{"code":"oid"},{"code":"positiveInt"},{"code":"string"},{"code":"time"},{"code":"unsignedInt"},{"code":"uri"},{"code":"url"},{"code":"uuid"},{"code":"Address"},{"code":"Age"},{"code":"Annotation"},{"code":"Attachment"},{"code":"CodeableConcept"},{"code":"Coding"},{"code":"ContactPoint"},{"code":"Count"},{"code":"Distance"},{"code":"Duration"},{"code":"HumanName"},{"code":"Identifier"},{"code":"Money"},{"code":"Period"},{"code":"Quantity"},{"code":"Range"},{"code":"Ratio"},{"code":"Reference"},{"code":"SampledData"},{"code":"Signature"},{"code":"Timing"},{"code":"ContactDetail"},{"code":"Contributor"},{"code":"DataRequirement"},{"code":"Expression"},{"code":"ParameterDefinition"},{"code":"RelatedArtifact"},{"code":"TriggerDefinition"},{"code":"UsageContext"},{"code":"Dosage"},{"code":"Meta"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.modifierExtension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Extensions that cannot be ignored","definition":"May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"DomainResource.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them","mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.identifier","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.identifier","short":"Identifier for this record (external references)","definition":"Unique identifier for this copy of the Consent Statement.","comment":"This identifier identifies this copy of the consent. Where this identifier is also used elsewhere as the identifier for a consent record (e.g. a CDA consent document) then the consent details are expected to be the same.","min":0,"max":"*","base":{"path":"Consent.identifier","min":0,"max":"*"},"type":[{"code":"Identifier"}],"example":[{"label":"General","valueIdentifier":{"system":"urn:ietf:rfc:3986","value":"Local eCMS identifier"}}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX / EI (occasionally, more often EI maps to a resource id or a URL)"},{"identity":"rim","map":"II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]"},{"identity":"servd","map":"Identifier"},{"identity":"workflow","map":"Event.identifier"},{"identity":"w5","map":"FiveWs.identifier"},{"identity":"rim","map":".id"}]},{"id":"Consent.status","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.status","short":"draft | proposed | active | rejected | inactive | entered-in-error","definition":"Indicates the current state of this consent.","comment":"This element is labeled as a modifier because the status contains the codes rejected and entered-in-error that mark the Consent as not currently valid.","requirements":"The Consent Directive that is pointed to might be in various lifecycle states, e.g., a revoked Consent Directive.","min":1,"max":"1","base":{"path":"Consent.status","min":1,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isModifier":true,"isModifierReason":"This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid","isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentState"}],"strength":"required","description":"Indicates the state of the consent.","valueSet":"http://hl7.org/fhir/ValueSet/consent-state-codes|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"workflow","map":"Event.status"},{"identity":"w5","map":"FiveWs.status"},{"identity":"v2","map":"HL7 Table 0498 - Consent Status"},{"identity":"rim","map":".statusCode"}]},{"id":"Consent.scope","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.scope","short":"Which of the four areas this resource covers (extensible)","definition":"A selector of the type of consent being presented: ADR, Privacy, Treatment, Research. This list is now extensible.","comment":"Wird im Kontext des Einwilligungsmanagment-Leitfadens nicht näher definiert.\r\nBei Bedarf kann das ValueSet erweitert oder ggf. ein NullFlavor-Code eingetragen werden.","min":1,"max":"1","base":{"path":"Consent.scope","min":1,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isModifier":true,"isModifierReason":"Allows changes to codes based on scope selection","isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentScope"}],"strength":"extensible","description":"The four anticipated uses for the Consent Resource.","valueSet":"http://hl7.org/fhir/ValueSet/consent-scope"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"}]},{"id":"Consent.scope.id","path":"Consent.scope.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.scope.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.scope.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.scope.coding","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.scope.coding","short":"Code defined by a terminology system","definition":"A reference to a code defined by a terminology system.","comment":"Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.","requirements":"Allows for alternative encodings within a code system, and translations to other code systems.","min":1,"max":"1","base":{"path":"CodeableConcept.coding","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"},{"identity":"v2","map":"C*E.1-8, C*E.10-22"},{"identity":"rim","map":"union(., ./translation)"},{"identity":"orim","map":"fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"}]},{"id":"Consent.scope.coding.id","path":"Consent.scope.coding.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.scope.coding.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.scope.coding.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.scope.coding.system","path":"Consent.scope.coding.system","short":"Identity of the terminology system","definition":"The identification of the code system that defines the meaning of the symbol in the code.","comment":"The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.","requirements":"Need to be unambiguous about the source of the definition of the symbol.","min":1,"max":"1","base":{"path":"Coding.system","min":0,"max":"1"},"type":[{"code":"uri"}],"fixedUri":"http://terminology.hl7.org/CodeSystem/consentscope","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.3"},{"identity":"rim","map":"./codeSystem"},{"identity":"orim","map":"fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"}]},{"id":"Consent.scope.coding.version","path":"Consent.scope.coding.version","short":"Version of the system - if relevant","definition":"The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.","comment":"Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.","min":0,"max":"1","base":{"path":"Coding.version","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.7"},{"identity":"rim","map":"./codeSystemVersion"},{"identity":"orim","map":"fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"}]},{"id":"Consent.scope.coding.code","path":"Consent.scope.coding.code","short":"Symbol in syntax defined by the system","definition":"A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to refer to a particular code in the system.","min":1,"max":"1","base":{"path":"Coding.code","min":0,"max":"1"},"type":[{"code":"code"}],"fixedCode":"research","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.1"},{"identity":"rim","map":"./code"},{"identity":"orim","map":"fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"}]},{"id":"Consent.scope.coding.display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.scope.coding.display","short":"Representation defined by the system","definition":"A representation of the meaning of the code in the system, following the rules of the system.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to be able to carry a human-readable meaning of the code for readers that do not know the system.","min":0,"max":"1","base":{"path":"Coding.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.2 - but note this is not well followed"},{"identity":"rim","map":"CV.displayName"},{"identity":"orim","map":"fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"}]},{"id":"Consent.scope.coding.userSelected","path":"Consent.scope.coding.userSelected","short":"If this coding was chosen directly by the user","definition":"Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).","comment":"Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.","requirements":"This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.","min":0,"max":"1","base":{"path":"Coding.userSelected","min":0,"max":"1"},"type":[{"code":"boolean"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"Sometimes implied by being first"},{"identity":"rim","map":"CD.codingRationale"},{"identity":"orim","map":"fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]"}]},{"id":"Consent.scope.text","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.scope.text","short":"Plain text representation of the concept","definition":"A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.","comment":"Very often the text is the same as a displayName of one of the codings.","requirements":"The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.","min":0,"max":"1","base":{"path":"CodeableConcept.text","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.9. But note many systems use C*E.2 for this"},{"identity":"rim","map":"./originalText[mediaType/code=\"text/plain\"]/data"},{"identity":"orim","map":"fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"}]},{"id":"Consent.category","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.category","slicing":{"discriminator":[{"type":"pattern","path":"$this"}],"rules":"closed"},"short":"Classification of the consent statement - for indexing/retrieval","definition":"A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.","comment":"Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.","min":2,"max":"2","base":{"path":"Consent.category","min":1,"max":"*"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentCategory"}],"strength":"extensible","description":"A classification of the type of consents found in a consent statement.","valueSet":"http://hl7.org/fhir/ValueSet/consent-category"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"workflow","map":"Event.code"},{"identity":"w5","map":"FiveWs.class"},{"identity":"v2","map":"HL7 Table 0497 - Consent Type"},{"identity":"rim","map":"CNTRCT"}]},{"id":"Consent.category:loinc","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.category","sliceName":"loinc","short":"Classification of the consent statement - for indexing/retrieval","definition":"A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.","comment":"Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.","min":1,"max":"1","base":{"path":"Consent.category","min":1,"max":"*"},"type":[{"code":"CodeableConcept"}],"patternCodeableConcept":{"coding":[{"system":"http://loinc.org","code":"57016-8"}]},"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentCategory"}],"strength":"extensible","description":"A classification of the type of consents found in a consent statement.","valueSet":"http://hl7.org/fhir/ValueSet/consent-category"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"workflow","map":"Event.code"},{"identity":"w5","map":"FiveWs.class"},{"identity":"v2","map":"HL7 Table 0497 - Consent Type"},{"identity":"rim","map":"CNTRCT"}]},{"id":"Consent.category:loinc.id","path":"Consent.category.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.category:loinc.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.category.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.category:loinc.coding","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.category.coding","short":"Code defined by a terminology system","definition":"A reference to a code defined by a terminology system.","comment":"Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.","requirements":"Allows for alternative encodings within a code system, and translations to other code systems.","min":1,"max":"1","base":{"path":"CodeableConcept.coding","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"},{"identity":"v2","map":"C*E.1-8, C*E.10-22"},{"identity":"rim","map":"union(., ./translation)"},{"identity":"orim","map":"fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"}]},{"id":"Consent.category:loinc.coding.id","path":"Consent.category.coding.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.category:loinc.coding.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.category.coding.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.category:loinc.coding.system","path":"Consent.category.coding.system","short":"Identity of the terminology system","definition":"The identification of the code system that defines the meaning of the symbol in the code.","comment":"The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.","requirements":"Need to be unambiguous about the source of the definition of the symbol.","min":1,"max":"1","base":{"path":"Coding.system","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.3"},{"identity":"rim","map":"./codeSystem"},{"identity":"orim","map":"fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"}]},{"id":"Consent.category:loinc.coding.version","path":"Consent.category.coding.version","short":"Version of the system - if relevant","definition":"The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.","comment":"Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.","min":0,"max":"1","base":{"path":"Coding.version","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.7"},{"identity":"rim","map":"./codeSystemVersion"},{"identity":"orim","map":"fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"}]},{"id":"Consent.category:loinc.coding.code","path":"Consent.category.coding.code","short":"Symbol in syntax defined by the system","definition":"A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to refer to a particular code in the system.","min":1,"max":"1","base":{"path":"Coding.code","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.1"},{"identity":"rim","map":"./code"},{"identity":"orim","map":"fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"}]},{"id":"Consent.category:loinc.coding.display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.category.coding.display","short":"Representation defined by the system","definition":"A representation of the meaning of the code in the system, following the rules of the system.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to be able to carry a human-readable meaning of the code for readers that do not know the system.","min":0,"max":"1","base":{"path":"Coding.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.2 - but note this is not well followed"},{"identity":"rim","map":"CV.displayName"},{"identity":"orim","map":"fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"}]},{"id":"Consent.category:loinc.coding.userSelected","path":"Consent.category.coding.userSelected","short":"If this coding was chosen directly by the user","definition":"Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).","comment":"Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.","requirements":"This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.","min":0,"max":"1","base":{"path":"Coding.userSelected","min":0,"max":"1"},"type":[{"code":"boolean"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"Sometimes implied by being first"},{"identity":"rim","map":"CD.codingRationale"},{"identity":"orim","map":"fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]"}]},{"id":"Consent.category:loinc.text","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.category.text","short":"Plain text representation of the concept","definition":"A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.","comment":"Very often the text is the same as a displayName of one of the codings.","requirements":"The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.","min":0,"max":"1","base":{"path":"CodeableConcept.text","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.9. But note many systems use C*E.2 for this"},{"identity":"rim","map":"./originalText[mediaType/code=\"text/plain\"]/data"},{"identity":"orim","map":"fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"}]},{"id":"Consent.category:mii","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.category","sliceName":"mii","short":"Classification of the consent statement - for indexing/retrieval","definition":"A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.","comment":"Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.","min":1,"max":"1","base":{"path":"Consent.category","min":1,"max":"*"},"type":[{"code":"CodeableConcept"}],"patternCodeableConcept":{"coding":[{"code":"2.16.840.1.113883.3.1937.777.24.2.184"}]},"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentCategory"}],"strength":"extensible","description":"A classification of the type of consents found in a consent statement.","valueSet":"http://hl7.org/fhir/ValueSet/consent-category"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"workflow","map":"Event.code"},{"identity":"w5","map":"FiveWs.class"},{"identity":"v2","map":"HL7 Table 0497 - Consent Type"},{"identity":"rim","map":"CNTRCT"}]},{"id":"Consent.category:mii.id","path":"Consent.category.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.category:mii.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.category.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.category:mii.coding","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.category.coding","short":"Code defined by a terminology system","definition":"A reference to a code defined by a terminology system.","comment":"Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.","requirements":"Allows for alternative encodings within a code system, and translations to other code systems.","min":1,"max":"1","base":{"path":"CodeableConcept.coding","min":0,"max":"*"},"type":[{"code":"Coding"}],"patternCoding":{"system":"https://www.medizininformatik-initiative.de/fhir/modul-consent/CodeSystem/mii-cs-consent-consent_category"},"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"},{"identity":"v2","map":"C*E.1-8, C*E.10-22"},{"identity":"rim","map":"union(., ./translation)"},{"identity":"orim","map":"fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"}]},{"id":"Consent.category:mii.coding.id","path":"Consent.category.coding.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.category:mii.coding.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.category.coding.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.category:mii.coding.system","path":"Consent.category.coding.system","short":"Identity of the terminology system","definition":"The identification of the code system that defines the meaning of the symbol in the code.","comment":"The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.","requirements":"Need to be unambiguous about the source of the definition of the symbol.","min":1,"max":"1","base":{"path":"Coding.system","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.3"},{"identity":"rim","map":"./codeSystem"},{"identity":"orim","map":"fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"}]},{"id":"Consent.category:mii.coding.version","path":"Consent.category.coding.version","short":"Version of the system - if relevant","definition":"The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.","comment":"Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.","min":0,"max":"1","base":{"path":"Coding.version","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.7"},{"identity":"rim","map":"./codeSystemVersion"},{"identity":"orim","map":"fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"}]},{"id":"Consent.category:mii.coding.code","path":"Consent.category.coding.code","short":"Symbol in syntax defined by the system","definition":"A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to refer to a particular code in the system.","min":1,"max":"1","base":{"path":"Coding.code","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.1"},{"identity":"rim","map":"./code"},{"identity":"orim","map":"fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"}]},{"id":"Consent.category:mii.coding.display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.category.coding.display","short":"Representation defined by the system","definition":"A representation of the meaning of the code in the system, following the rules of the system.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to be able to carry a human-readable meaning of the code for readers that do not know the system.","min":0,"max":"1","base":{"path":"Coding.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.2 - but note this is not well followed"},{"identity":"rim","map":"CV.displayName"},{"identity":"orim","map":"fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"}]},{"id":"Consent.category:mii.coding.userSelected","path":"Consent.category.coding.userSelected","short":"If this coding was chosen directly by the user","definition":"Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).","comment":"Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.","requirements":"This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.","min":0,"max":"1","base":{"path":"Coding.userSelected","min":0,"max":"1"},"type":[{"code":"boolean"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"Sometimes implied by being first"},{"identity":"rim","map":"CD.codingRationale"},{"identity":"orim","map":"fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]"}]},{"id":"Consent.category:mii.text","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.category.text","short":"Plain text representation of the concept","definition":"A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.","comment":"Very often the text is the same as a displayName of one of the codings.","requirements":"The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.","min":0,"max":"1","base":{"path":"CodeableConcept.text","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.9. But note many systems use C*E.2 for this"},{"identity":"rim","map":"./originalText[mediaType/code=\"text/plain\"]/data"},{"identity":"orim","map":"fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"}]},{"id":"Consent.patient","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.patient","short":"Who the consent applies to","definition":"The patient/healthcare consumer to whom this consent applies.","comment":"Commonly, the patient the consent pertains to is the author, but for young and old people, it may be some other person.","min":1,"max":"1","base":{"path":"Consent.patient","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://fhir.de/ConsentManagement/StructureDefinition/Patient"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.subject"},{"identity":"w5","map":"FiveWs.subject[x]"},{"identity":"rim","map":"Role"},{"identity":"w5","map":"FiveWs.subject"}]},{"id":"Consent.patient.id","path":"Consent.patient.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.patient.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.patient.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.patient.reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.patient.reference","short":"Literal reference, Relative, internal or absolute URL","definition":"A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.","comment":"Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.","min":0,"max":"1","base":{"path":"Reference.reference","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1","ref-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.patient.type","path":"Consent.patient.type","short":"Type the reference refers to (e.g. \"Patient\")","definition":"The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).","comment":"This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.","min":0,"max":"1","base":{"path":"Reference.type","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"FHIRResourceTypeExt"}],"strength":"extensible","description":"Aa resource (or, for logical models, the URI of the logical model).","valueSet":"http://hl7.org/fhir/ValueSet/resource-types"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.patient.identifier","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.patient.identifier","short":"Logical reference, when literal reference is not known","definition":"An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.","comment":"When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).","min":0,"max":"1","base":{"path":"Reference.identifier","min":0,"max":"1"},"type":[{"code":"Identifier"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX / EI (occasionally, more often EI maps to a resource id or a URL)"},{"identity":"rim","map":"II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]"},{"identity":"servd","map":"Identifier"},{"identity":"rim","map":".identifier"}]},{"id":"Consent.patient.identifier.id","path":"Consent.patient.identifier.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.patient.identifier.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.patient.identifier.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.patient.identifier.use","path":"Consent.patient.identifier.use","short":"usual | official | temp | secondary | old (If known)","definition":"The purpose of this identifier.","comment":"Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.","requirements":"Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.","min":0,"max":"1","base":{"path":"Identifier.use","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isModifier":true,"isModifierReason":"This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one.","isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"IdentifierUse"}],"strength":"required","description":"Identifies the purpose for this identifier, if known .","valueSet":"http://hl7.org/fhir/ValueSet/identifier-use|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"N/A"},{"identity":"rim","map":"Role.code or implied by context"}]},{"id":"Consent.patient.identifier.type","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.patient.identifier.type","short":"Description of identifier","definition":"A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.","comment":"This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.","requirements":"Allows users to make use of identifiers when the identifier system is not known.","min":0,"max":"1","base":{"path":"Identifier.type","min":0,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"IdentifierType"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"extensible","description":"A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.","valueSet":"http://hl7.org/fhir/ValueSet/identifier-type"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"v2","map":"CX.5"},{"identity":"rim","map":"Role.code or implied by context"}]},{"id":"Consent.patient.identifier.system","path":"Consent.patient.identifier.system","short":"The namespace for the identifier value","definition":"Establishes the namespace for the value - that is, a URL that describes a set values that are unique.","comment":"Identifier.system is always case sensitive.","requirements":"There are many sets of identifiers. To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.","min":1,"max":"1","base":{"path":"Identifier.system","min":0,"max":"1"},"type":[{"code":"uri"}],"example":[{"label":"General","valueUri":"http://www.acme.com/identifiers/patient"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX.4 / EI-2-4"},{"identity":"rim","map":"II.root or Role.id.root"},{"identity":"servd","map":"./IdentifierType"}]},{"id":"Consent.patient.identifier.value","path":"Consent.patient.identifier.value","short":"The value that is unique","definition":"The portion of the identifier typically relevant to the user and which is unique within the context of the system.","comment":"If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986. The value's primary purpose is computational mapping. As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.) A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.","min":1,"max":"1","base":{"path":"Identifier.value","min":0,"max":"1"},"type":[{"code":"string"}],"example":[{"label":"General","valueString":"123456"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX.1 / EI.1"},{"identity":"rim","map":"II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)"},{"identity":"servd","map":"./Value"}]},{"id":"Consent.patient.identifier.period","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.patient.identifier.period","short":"Time period when id is/was valid for use","definition":"Time period during which identifier is/was valid for use.","comment":"A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).","min":0,"max":"1","base":{"path":"Identifier.period","min":0,"max":"1"},"type":[{"code":"Period"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"per-1","severity":"error","human":"If present, start SHALL have a lower value than end","expression":"start.hasValue().not() or end.hasValue().not() or (start <= end)","xpath":"not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))","source":"http://hl7.org/fhir/StructureDefinition/Consent"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR"},{"identity":"rim","map":"IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]"},{"identity":"v2","map":"CX.7 + CX.8"},{"identity":"rim","map":"Role.effectiveTime or implied by context"},{"identity":"servd","map":"./StartDate and ./EndDate"}]},{"id":"Consent.patient.identifier.assigner","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.patient.identifier.assigner","short":"Organization that issued id (may be just text)","definition":"Organization that issued/manages the identifier.","comment":"The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.","min":0,"max":"1","base":{"path":"Identifier.assigner","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Organization"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"v2","map":"CX.4 / (CX.4,CX.9,CX.10)"},{"identity":"rim","map":"II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper"},{"identity":"servd","map":"./IdentifierIssuingAuthority"}]},{"id":"Consent.patient.display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.patient.display","short":"Text alternative for the resource","definition":"Plain text narrative that identifies the resource in addition to the resource reference.","comment":"This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.","min":0,"max":"1","base":{"path":"Reference.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.dateTime","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.dateTime","short":"Erstellungszeitpunkt der Einwilligung","definition":"Dieser Zeitpunkt sollte in der Praxis, zumindest bei vollelektronischer Verarbeitung, identisch mit dem Unterschriftsdatum des Fragebogens sein (Provenance.signature.when des Patienten)","comment":"Dieser Zeitpunkt sollte in der Praxis, zumindest bei vollelektronischer Verarbeitung, identisch mit dem Unterschriftsdatum des Fragebogens sein (Provenance.signature.when des Patienten)","min":1,"max":"1","base":{"path":"Consent.dateTime","min":0,"max":"1"},"type":[{"code":"dateTime"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"workflow","map":"Event.occurrence[x]"},{"identity":"w5","map":"FiveWs.recorded"},{"identity":"v2","map":"Field 13/ Consent Decision Date"},{"identity":"rim","map":"FinancialConsent effectiveTime"}]},{"id":"Consent.performer","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.performer","short":"Who is agreeing to the policy and rules","definition":"Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.","comment":"Commonly, the patient the consent pertains to is the consentor, but particularly for young and old people, it may be some other person - e.g. a legal guardian.","alias":["consentor"],"min":0,"max":"*","base":{"path":"Consent.performer","min":0,"max":"*"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Organization","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/PractitionerRole"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.performer"},{"identity":"w5","map":"FiveWs.actor"},{"identity":"v2","map":"Field 24/ ConsenterID"}]},{"id":"Consent.organization","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.organization","short":"Organisation, in der die Einwilligung erfasst wurde.","definition":"Dies ist die Organisation, die den Consent erfasst hat.","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","alias":["custodian"],"min":0,"max":"*","base":{"path":"Consent.organization","min":0,"max":"*"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Organization"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.performer"},{"identity":"w5","map":"FiveWs.witness"}]},{"id":"Consent.source[x]","path":"Consent.source[x]","short":"Source from which this consent is taken","definition":"The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.","comment":"The source can be contained inline (Attachment), referenced directly (Consent), referenced in a consent repository (DocumentReference), or simply by an identifier (Identifier), e.g. a CDA document id.","min":0,"max":"1","base":{"path":"Consent.source[x]","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireResponse"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"Field 19 Informational Material Supplied Indicator"}]},{"id":"Consent.source[x].id","path":"Consent.source[x].id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.source[x].extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.source[x].extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.source[x].reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.source[x].reference","short":"Literal reference, Relative, internal or absolute URL","definition":"A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.","comment":"Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.","min":1,"max":"1","base":{"path":"Reference.reference","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1","ref-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.source[x].type","path":"Consent.source[x].type","short":"Type the reference refers to (e.g. \"Patient\")","definition":"The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).","comment":"This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.","min":0,"max":"1","base":{"path":"Reference.type","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"FHIRResourceTypeExt"}],"strength":"extensible","description":"Aa resource (or, for logical models, the URI of the logical model).","valueSet":"http://hl7.org/fhir/ValueSet/resource-types"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.source[x].identifier","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.source[x].identifier","short":"Logical reference, when literal reference is not known","definition":"An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.","comment":"When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).","min":0,"max":"1","base":{"path":"Reference.identifier","min":0,"max":"1"},"type":[{"code":"Identifier"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX / EI (occasionally, more often EI maps to a resource id or a URL)"},{"identity":"rim","map":"II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]"},{"identity":"servd","map":"Identifier"},{"identity":"rim","map":".identifier"}]},{"id":"Consent.source[x].display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.source[x].display","short":"Text alternative for the resource","definition":"Plain text narrative that identifies the resource in addition to the resource reference.","comment":"This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.","min":0,"max":"1","base":{"path":"Reference.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.policy","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.policy","short":"Policies covered by this consent","definition":"The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.","min":1,"max":"*","base":{"path":"Consent.policy","min":0,"max":"*"},"type":[{"code":"BackboneElement"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.policy.id","path":"Consent.policy.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.policy.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.policy.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.policy.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.policy.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.policy.authority","path":"Consent.policy.authority","short":"Enforcement source for policy","definition":"Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.","comment":"see http://en.wikipedia.org/wiki/Uniform_resource_identifier","min":0,"max":"1","base":{"path":"Consent.policy.authority","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1","ppc-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.policy.uri","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.policy.uri","short":"Specific policy covered by this consent","definition":"The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.","comment":"This element is for discoverability / documentation and does not modify or qualify the policy rules.","min":1,"max":"1","base":{"path":"Consent.policy.uri","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1","ppc-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.policyRule","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.policyRule","short":"Regulation that this consents to","definition":"A reference to the specific base computable regulation or policy.","comment":"If the policyRule is absent, computable consent would need to be constructed from the elements of the Consent resource.","requirements":"Might be a unique identifier of a policy set in XACML, or other rules engine.","min":0,"max":"1","base":{"path":"Consent.policyRule","min":0,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1","ppc-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentPolicyRule"}],"strength":"extensible","description":"Regulatory policy examples.","valueSet":"http://hl7.org/fhir/ValueSet/consent-policy"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"}]},{"id":"Consent.policyRule.id","path":"Consent.policyRule.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.policyRule.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.policyRule.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.policyRule.extension:xacml","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.policyRule.extension","sliceName":"xacml","short":"Optional Extensions Element","definition":"Optional Extension Element - found in all resources.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"1","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension","profile":["http://fhir.de/ConsentManagement/StructureDefinition/Xacml"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.policyRule.coding","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.policyRule.coding","short":"Code defined by a terminology system","definition":"A reference to a code defined by a terminology system.","comment":"Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.","requirements":"Allows for alternative encodings within a code system, and translations to other code systems.","min":0,"max":"*","base":{"path":"CodeableConcept.coding","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"},{"identity":"v2","map":"C*E.1-8, C*E.10-22"},{"identity":"rim","map":"union(., ./translation)"},{"identity":"orim","map":"fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"}]},{"id":"Consent.policyRule.text","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.policyRule.text","short":"Plain text representation of the concept","definition":"A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.","comment":"Very often the text is the same as a displayName of one of the codings.","requirements":"The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.","min":0,"max":"1","base":{"path":"CodeableConcept.text","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.9. But note many systems use C*E.2 for this"},{"identity":"rim","map":"./originalText[mediaType/code=\"text/plain\"]/data"},{"identity":"orim","map":"fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"}]},{"id":"Consent.verification","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.verification","short":"Consent Verified by patient or family","definition":"Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person.","min":0,"max":"*","base":{"path":"Consent.verification","min":0,"max":"*"},"type":[{"code":"BackboneElement"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.verification.id","path":"Consent.verification.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.verification.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.verification.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.verification.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.verification.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.verification.verified","path":"Consent.verification.verified","short":"Has been verified","definition":"Has the instruction been verified.","min":1,"max":"1","base":{"path":"Consent.verification.verified","min":1,"max":"1"},"type":[{"code":"boolean"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.verification.verifiedWith","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.verification.verifiedWith","short":"Person who verified","definition":"Who verified the instruction (Patient, Relative or other Authorized Person).","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":0,"max":"1","base":{"path":"Consent.verification.verifiedWith","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/RelatedPerson"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"}]},{"id":"Consent.verification.verificationDate","path":"Consent.verification.verificationDate","short":"When consent verified","definition":"Date verification was collected.","min":0,"max":"1","base":{"path":"Consent.verification.verificationDate","min":0,"max":"1"},"type":[{"code":"dateTime"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name","valueString":"provision"}],"path":"Consent.provision","short":"Constraints to the base Consent.policyRule","definition":"An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.","min":0,"max":"1","base":{"path":"Consent.provision","min":0,"max":"1"},"type":[{"code":"BackboneElement"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.id","path":"Consent.provision.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.type","path":"Consent.provision.type","short":"deny | permit","definition":"Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","min":1,"max":"1","base":{"path":"Consent.provision.type","min":0,"max":"1"},"type":[{"code":"code"}],"fixedCode":"deny","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentProvisionType"}],"strength":"required","description":"How a rule statement is applied, such as adding additional consent or removing consent.","valueSet":"http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.period","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.period","short":"Timeframe for this rule","definition":"The timeframe in this rule is valid.","comment":"A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).","min":1,"max":"1","base":{"path":"Consent.provision.period","min":0,"max":"1"},"type":[{"code":"Period"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"per-1","severity":"error","human":"If present, start SHALL have a lower value than end","expression":"start.hasValue().not() or end.hasValue().not() or (start <= end)","xpath":"not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))","source":"http://hl7.org/fhir/StructureDefinition/Consent"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR"},{"identity":"rim","map":"IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]"}]},{"id":"Consent.provision.period.id","path":"Consent.provision.period.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.period.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.period.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.period.start","path":"Consent.provision.period.start","short":"Starting time with inclusive boundary","definition":"The start of the period. The boundary is inclusive.","comment":"If the low element is missing, the meaning is that the low boundary is not known.","min":1,"max":"1","base":{"path":"Period.start","min":0,"max":"1"},"type":[{"code":"dateTime"}],"condition":["ele-1","per-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR.1"},{"identity":"rim","map":"./low"}]},{"id":"Consent.provision.period.end","path":"Consent.provision.period.end","short":"End time with inclusive boundary, if not ongoing","definition":"The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.","comment":"The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03.","min":1,"max":"1","base":{"path":"Period.end","min":0,"max":"1"},"type":[{"code":"dateTime"}],"meaningWhenMissing":"If the end of the period is missing, it means that the period is ongoing","condition":["ele-1","per-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR.2"},{"identity":"rim","map":"./high"}]},{"id":"Consent.provision.actor","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name","valueString":"provisionActor"}],"path":"Consent.provision.actor","short":"Who|what controlled by this rule (or group, by role)","definition":"Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').","min":0,"max":"*","base":{"path":"Consent.provision.actor","min":0,"max":"*"},"type":[{"code":"BackboneElement"}],"meaningWhenMissing":"There is no specific actor associated with the exception","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.actor.id","path":"Consent.provision.actor.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.actor.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.actor.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.actor.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.actor.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.actor.role","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.actor.role","short":"How the actor is involved","definition":"How the individual is involved in the resources content that is described in the exception.","comment":"Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.","min":1,"max":"1","base":{"path":"Consent.provision.actor.role","min":1,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentActorRole"}],"strength":"extensible","description":"How an actor is involved in the consent considerations.","valueSet":"http://hl7.org/fhir/ValueSet/security-role-type"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"}]},{"id":"Consent.provision.actor.reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.actor.reference","short":"Resource for the actor (or group, by role)","definition":"The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":1,"max":"1","base":{"path":"Consent.provision.actor.reference","min":1,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Group","http://hl7.org/fhir/StructureDefinition/CareTeam","http://hl7.org/fhir/StructureDefinition/Organization","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/PractitionerRole"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"}]},{"id":"Consent.provision.action","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.action","short":"Actions controlled by this rule","definition":"Actions controlled by this Rule.","comment":"Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.","min":0,"max":"0","base":{"path":"Consent.provision.action","min":0,"max":"*"},"type":[{"code":"CodeableConcept"}],"meaningWhenMissing":"all actions","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentAction"}],"strength":"example","description":"Detailed codes for the consent action.","valueSet":"http://hl7.org/fhir/ValueSet/consent-action"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"}]},{"id":"Consent.provision.securityLabel","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.securityLabel","short":"Security Labels that define affected resources","definition":"A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.","comment":"If the consent specifies a security label of \"R\" then it applies to all resources that are labeled \"R\" or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. When the purpose of use tag is on the data, access request purpose of use shall not conflict.","min":0,"max":"*","base":{"path":"Consent.provision.securityLabel","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"SecurityLabels"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"extensible","description":"Security Labels from the Healthcare Privacy and Security Classification System.","valueSet":"http://hl7.org/fhir/ValueSet/security-labels"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"}]},{"id":"Consent.provision.purpose","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.purpose","short":"Context of activities covered by this rule","definition":"The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.","comment":"When the purpose of use tag is on the data, access request purpose of use shall not conflict.","min":0,"max":"*","base":{"path":"Consent.provision.purpose","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"PurposeOfUse"}],"strength":"extensible","description":"What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels.","valueSet":"http://terminology.hl7.org/ValueSet/v3-PurposeOfUse"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"}]},{"id":"Consent.provision.class","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.class","short":"e.g. Resource Type, Profile, CDA, etc.","definition":"The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.","comment":"Multiple types are or'ed together. The intention of the contentType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere.","min":0,"max":"*","base":{"path":"Consent.provision.class","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentContentClass"}],"strength":"extensible","description":"The class (type) of information a consent rule covers.","valueSet":"http://hl7.org/fhir/ValueSet/consent-content-class"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"}]},{"id":"Consent.provision.code","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.code","short":"e.g. LOINC or SNOMED CT code, etc. in the content","definition":"If this code is found in an instance, then the rule applies.","comment":"Typical use of this is a Document code with class = CDA.","min":0,"max":"0","base":{"path":"Consent.provision.code","min":0,"max":"*"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentContentCode"}],"strength":"example","description":"If this code is found in an instance, then the exception applies.","valueSet":"http://hl7.org/fhir/ValueSet/consent-content-code"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"}]},{"id":"Consent.provision.dataPeriod","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.dataPeriod","short":"Timeframe for data controlled by this rule","definition":"Clinical or Operational Relevant period of time that bounds the data controlled by this rule.","comment":"This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement.","min":0,"max":"1","base":{"path":"Consent.provision.dataPeriod","min":0,"max":"1"},"type":[{"code":"Period"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"per-1","severity":"error","human":"If present, start SHALL have a lower value than end","expression":"start.hasValue().not() or end.hasValue().not() or (start <= end)","xpath":"not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))","source":"http://hl7.org/fhir/StructureDefinition/Consent"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR"},{"identity":"rim","map":"IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]"}]},{"id":"Consent.provision.data","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name","valueString":"provisionData"}],"path":"Consent.provision.data","short":"Data controlled by this rule","definition":"The resources controlled by this rule if specific resources are referenced.","min":0,"max":"*","base":{"path":"Consent.provision.data","min":0,"max":"*"},"type":[{"code":"BackboneElement"}],"meaningWhenMissing":"all data","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"Role"}]},{"id":"Consent.provision.data.id","path":"Consent.provision.data.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.data.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.data.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.data.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.data.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.data.meaning","path":"Consent.provision.data.meaning","short":"instance | related | dependents | authoredby","definition":"How the resource reference is interpreted when testing consent restrictions.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","min":1,"max":"1","base":{"path":"Consent.provision.data.meaning","min":1,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentDataMeaning"}],"strength":"required","description":"How a resource reference is interpreted when testing consent restrictions.","valueSet":"http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.data.reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.data.reference","short":"The actual data reference","definition":"A reference to a specific resource that defines which resources are covered by this consent.","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":1,"max":"1","base":{"path":"Consent.provision.data.reference","min":1,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Resource"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"}]},{"id":"Consent.provision.provision","path":"Consent.provision.provision","short":"Nested Exception Rules","definition":"Rules which provide exceptions to the base rule or subrules.","min":0,"max":"*","base":{"path":"Consent.provision.provision","min":0,"max":"*"},"contentReference":"http://hl7.org/fhir/StructureDefinition/Consent#Consent.provision","mustSupport":true},{"id":"Consent.provision.provision.id","path":"Consent.provision.provision.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.provision.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.provision.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.provision.type","path":"Consent.provision.provision.type","short":"deny | permit","definition":"Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","min":1,"max":"1","base":{"path":"Consent.provision.type","min":0,"max":"1"},"type":[{"code":"code"}],"fixedCode":"permit","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentProvisionType"}],"strength":"required","description":"How a rule statement is applied, such as adding additional consent or removing consent.","valueSet":"http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.provision.period","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.period","short":"Timeframe for this rule","definition":"The timeframe in this rule is valid.","comment":"A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).","min":1,"max":"1","base":{"path":"Consent.provision.period","min":0,"max":"1"},"type":[{"code":"Period"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"per-1","severity":"error","human":"If present, start SHALL have a lower value than end","expression":"start.hasValue().not() or end.hasValue().not() or (start <= end)","xpath":"not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))","source":"http://hl7.org/fhir/StructureDefinition/Consent"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR"},{"identity":"rim","map":"IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]"}]},{"id":"Consent.provision.provision.period.id","path":"Consent.provision.provision.period.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.provision.period.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.period.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.provision.period.start","path":"Consent.provision.provision.period.start","short":"Starting time with inclusive boundary","definition":"The start of the period. The boundary is inclusive.","comment":"If the low element is missing, the meaning is that the low boundary is not known.","min":1,"max":"1","base":{"path":"Period.start","min":0,"max":"1"},"type":[{"code":"dateTime"}],"condition":["ele-1","per-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR.1"},{"identity":"rim","map":"./low"}]},{"id":"Consent.provision.provision.period.end","path":"Consent.provision.provision.period.end","short":"End time with inclusive boundary, if not ongoing","definition":"The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.","comment":"The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03.","min":1,"max":"1","base":{"path":"Period.end","min":0,"max":"1"},"type":[{"code":"dateTime"}],"meaningWhenMissing":"If the end of the period is missing, it means that the period is ongoing","condition":["ele-1","per-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR.2"},{"identity":"rim","map":"./high"}]},{"id":"Consent.provision.provision.actor","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name","valueString":"provisionActor"}],"path":"Consent.provision.provision.actor","short":"Who|what controlled by this rule (or group, by role)","definition":"Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').","min":0,"max":"*","base":{"path":"Consent.provision.actor","min":0,"max":"*"},"type":[{"code":"BackboneElement"}],"meaningWhenMissing":"There is no specific actor associated with the exception","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.provision.actor.id","path":"Consent.provision.provision.actor.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.provision.actor.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.actor.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.provision.actor.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.actor.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.provision.actor.role","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.actor.role","short":"How the actor is involved","definition":"How the individual is involved in the resources content that is described in the exception.","comment":"Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.","min":1,"max":"1","base":{"path":"Consent.provision.actor.role","min":1,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentActorRole"}],"strength":"extensible","description":"How an actor is involved in the consent considerations.","valueSet":"http://hl7.org/fhir/ValueSet/security-role-type"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"}]},{"id":"Consent.provision.provision.actor.reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.actor.reference","short":"Resource for the actor (or group, by role)","definition":"The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":1,"max":"1","base":{"path":"Consent.provision.actor.reference","min":1,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Group","http://hl7.org/fhir/StructureDefinition/CareTeam","http://hl7.org/fhir/StructureDefinition/Organization","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/PractitionerRole"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"}]},{"id":"Consent.provision.provision.action","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.action","short":"Actions controlled by this rule","definition":"Actions controlled by this Rule.","comment":"Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.","min":0,"max":"0","base":{"path":"Consent.provision.action","min":0,"max":"*"},"type":[{"code":"CodeableConcept"}],"meaningWhenMissing":"all actions","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentAction"}],"strength":"example","description":"Detailed codes for the consent action.","valueSet":"http://hl7.org/fhir/ValueSet/consent-action"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"}]},{"id":"Consent.provision.provision.securityLabel","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.securityLabel","short":"Security Labels that define affected resources","definition":"A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.","comment":"If the consent specifies a security label of \"R\" then it applies to all resources that are labeled \"R\" or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. When the purpose of use tag is on the data, access request purpose of use shall not conflict.","min":0,"max":"*","base":{"path":"Consent.provision.securityLabel","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"SecurityLabels"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"extensible","description":"Security Labels from the Healthcare Privacy and Security Classification System.","valueSet":"http://hl7.org/fhir/ValueSet/security-labels"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"}]},{"id":"Consent.provision.provision.purpose","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.purpose","short":"Context of activities covered by this rule","definition":"The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.","comment":"When the purpose of use tag is on the data, access request purpose of use shall not conflict.","min":0,"max":"*","base":{"path":"Consent.provision.purpose","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"PurposeOfUse"}],"strength":"extensible","description":"What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels.","valueSet":"http://terminology.hl7.org/ValueSet/v3-PurposeOfUse"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"}]},{"id":"Consent.provision.provision.class","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.class","short":"e.g. Resource Type, Profile, CDA, etc.","definition":"The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.","comment":"Multiple types are or'ed together. The intention of the contentType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere.","min":0,"max":"*","base":{"path":"Consent.provision.class","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentContentClass"}],"strength":"extensible","description":"The class (type) of information a consent rule covers.","valueSet":"http://hl7.org/fhir/ValueSet/consent-content-class"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"}]},{"id":"Consent.provision.provision.code","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.code","short":"e.g. LOINC or SNOMED CT code, etc. in the content","definition":"If this code is found in an instance, then the rule applies.","comment":"Typical use of this is a Document code with class = CDA.","min":1,"max":"*","base":{"path":"Consent.provision.code","min":0,"max":"*"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentContentCode"}],"strength":"required","description":"If this code is found in an instance, then the exception applies.","valueSet":"https://www.medizininformatik-initiative.de/fhir/modul-consent/ValueSet/mii-vs-consent-policy"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"}]},{"id":"Consent.provision.provision.code.id","path":"Consent.provision.provision.code.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.provision.code.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.code.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.provision.code.coding","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.code.coding","short":"Code defined by a terminology system","definition":"A reference to a code defined by a terminology system.","comment":"Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.","requirements":"Allows for alternative encodings within a code system, and translations to other code systems.","min":1,"max":"*","base":{"path":"CodeableConcept.coding","min":0,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"},{"identity":"v2","map":"C*E.1-8, C*E.10-22"},{"identity":"rim","map":"union(., ./translation)"},{"identity":"orim","map":"fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding"}]},{"id":"Consent.provision.provision.code.coding.id","path":"Consent.provision.provision.code.coding.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.provision.code.coding.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.code.coding.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.provision.code.coding.system","path":"Consent.provision.provision.code.coding.system","short":"Identity of the terminology system","definition":"The identification of the code system that defines the meaning of the symbol in the code.","comment":"The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.","requirements":"Need to be unambiguous about the source of the definition of the symbol.","min":1,"max":"1","base":{"path":"Coding.system","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.3"},{"identity":"rim","map":"./codeSystem"},{"identity":"orim","map":"fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"}]},{"id":"Consent.provision.provision.code.coding.version","path":"Consent.provision.provision.code.coding.version","short":"Version of the system - if relevant","definition":"The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.","comment":"Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.","min":0,"max":"1","base":{"path":"Coding.version","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.7"},{"identity":"rim","map":"./codeSystemVersion"},{"identity":"orim","map":"fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"}]},{"id":"Consent.provision.provision.code.coding.code","path":"Consent.provision.provision.code.coding.code","short":"Symbol in syntax defined by the system","definition":"A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to refer to a particular code in the system.","min":1,"max":"1","base":{"path":"Coding.code","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.1"},{"identity":"rim","map":"./code"},{"identity":"orim","map":"fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"}]},{"id":"Consent.provision.provision.code.coding.display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.provision.provision.code.coding.display","short":"Representation defined by the system","definition":"A representation of the meaning of the code in the system, following the rules of the system.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to be able to carry a human-readable meaning of the code for readers that do not know the system.","min":0,"max":"1","base":{"path":"Coding.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.2 - but note this is not well followed"},{"identity":"rim","map":"CV.displayName"},{"identity":"orim","map":"fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"}]},{"id":"Consent.provision.provision.code.coding.userSelected","path":"Consent.provision.provision.code.coding.userSelected","short":"If this coding was chosen directly by the user","definition":"Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).","comment":"Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.","requirements":"This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.","min":0,"max":"1","base":{"path":"Coding.userSelected","min":0,"max":"1"},"type":[{"code":"boolean"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"Sometimes implied by being first"},{"identity":"rim","map":"CD.codingRationale"},{"identity":"orim","map":"fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]"}]},{"id":"Consent.provision.provision.code.text","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Consent.provision.provision.code.text","short":"Plain text representation of the concept","definition":"A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.","comment":"Very often the text is the same as a displayName of one of the codings.","requirements":"The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.","min":0,"max":"1","base":{"path":"CodeableConcept.text","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.9. But note many systems use C*E.2 for this"},{"identity":"rim","map":"./originalText[mediaType/code=\"text/plain\"]/data"},{"identity":"orim","map":"fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText"}]},{"id":"Consent.provision.provision.dataPeriod","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.dataPeriod","short":"Timeframe for data controlled by this rule","definition":"Clinical or Operational Relevant period of time that bounds the data controlled by this rule.","comment":"This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement.","min":0,"max":"1","base":{"path":"Consent.provision.dataPeriod","min":0,"max":"1"},"type":[{"code":"Period"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"per-1","severity":"error","human":"If present, start SHALL have a lower value than end","expression":"start.hasValue().not() or end.hasValue().not() or (start <= end)","xpath":"not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))","source":"http://hl7.org/fhir/StructureDefinition/Consent"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"DR"},{"identity":"rim","map":"IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]"}]},{"id":"Consent.provision.provision.data","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name","valueString":"provisionData"}],"path":"Consent.provision.provision.data","short":"Data controlled by this rule","definition":"The resources controlled by this rule if specific resources are referenced.","min":0,"max":"*","base":{"path":"Consent.provision.data","min":0,"max":"*"},"type":[{"code":"BackboneElement"}],"meaningWhenMissing":"all data","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"Role"}]},{"id":"Consent.provision.provision.data.id","path":"Consent.provision.provision.data.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.provision.data.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.data.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.provision.data.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.data.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Consent.provision.provision.data.meaning","path":"Consent.provision.provision.data.meaning","short":"instance | related | dependents | authoredby","definition":"How the resource reference is interpreted when testing consent restrictions.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","min":1,"max":"1","base":{"path":"Consent.provision.data.meaning","min":1,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ConsentDataMeaning"}],"strength":"required","description":"How a resource reference is interpreted when testing consent restrictions.","valueSet":"http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Consent.provision.provision.data.reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.provision.provision.data.reference","short":"The actual data reference","definition":"A reference to a specific resource that defines which resources are covered by this consent.","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":1,"max":"1","base":{"path":"Consent.provision.data.reference","min":1,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Resource"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"}]},{"id":"Consent.provision.provision.provision","path":"Consent.provision.provision.provision","short":"Nested Exception Rules","definition":"Rules which provide exceptions to the base rule or subrules.","min":0,"max":"0","base":{"path":"Consent.provision.provision","min":0,"max":"*"},"contentReference":"http://hl7.org/fhir/StructureDefinition/Consent#Consent.provision"}]},"differential":{"element":[{"id":"Consent.id","path":"Consent.id","mustSupport":true},{"id":"Consent.meta","path":"Consent.meta","mustSupport":true},{"id":"Consent.meta.source","path":"Consent.meta.source","mustSupport":true},{"id":"Consent.meta.profile","path":"Consent.meta.profile","mustSupport":true},{"id":"Consent.extension","path":"Consent.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"rules":"open"}},{"id":"Consent.extension:domainReference","path":"Consent.extension","sliceName":"domainReference","type":[{"code":"Extension","profile":["http://fhir.de/ConsentManagement/StructureDefinition/DomainReference"]}],"mustSupport":true},{"id":"Consent.extension:domainReference.extension","path":"Consent.extension.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"rules":"open"}},{"id":"Consent.extension:domainReference.extension:domain","path":"Consent.extension.extension","sliceName":"domain","mustSupport":true},{"id":"Consent.status","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.status","mustSupport":true},{"id":"Consent.scope","path":"Consent.scope","comment":"Wird im Kontext des Einwilligungsmanagment-Leitfadens nicht näher definiert.\r\nBei Bedarf kann das ValueSet erweitert oder ggf. ein NullFlavor-Code eingetragen werden."},{"id":"Consent.scope.coding","path":"Consent.scope.coding","min":1,"max":"1"},{"id":"Consent.scope.coding.system","path":"Consent.scope.coding.system","min":1,"fixedUri":"http://terminology.hl7.org/CodeSystem/consentscope"},{"id":"Consent.scope.coding.code","path":"Consent.scope.coding.code","min":1,"fixedCode":"research"},{"id":"Consent.category","path":"Consent.category","slicing":{"discriminator":[{"type":"pattern","path":"$this"}],"rules":"closed"},"min":2,"max":"2","mustSupport":true},{"id":"Consent.category:loinc","path":"Consent.category","sliceName":"loinc","min":1,"max":"1","patternCodeableConcept":{"coding":[{"system":"http://loinc.org","code":"57016-8"}]},"mustSupport":true},{"id":"Consent.category:loinc.coding","path":"Consent.category.coding","min":1,"max":"1","mustSupport":true},{"id":"Consent.category:loinc.coding.system","path":"Consent.category.coding.system","min":1,"mustSupport":true},{"id":"Consent.category:loinc.coding.code","path":"Consent.category.coding.code","min":1,"mustSupport":true},{"id":"Consent.category:mii","path":"Consent.category","sliceName":"mii","min":1,"max":"1","patternCodeableConcept":{"coding":[{"code":"2.16.840.1.113883.3.1937.777.24.2.184"}]},"mustSupport":true},{"id":"Consent.category:mii.coding","path":"Consent.category.coding","min":1,"max":"1","patternCoding":{"system":"https://www.medizininformatik-initiative.de/fhir/modul-consent/CodeSystem/mii-cs-consent-consent_category"},"mustSupport":true},{"id":"Consent.category:mii.coding.system","path":"Consent.category.coding.system","min":1,"mustSupport":true},{"id":"Consent.category:mii.coding.code","path":"Consent.category.coding.code","min":1,"mustSupport":true},{"id":"Consent.patient","path":"Consent.patient","min":1,"type":[{"code":"Reference","targetProfile":["http://fhir.de/ConsentManagement/StructureDefinition/Patient"]}],"mustSupport":true},{"id":"Consent.patient.reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.patient.reference","mustSupport":true},{"id":"Consent.patient.identifier","path":"Consent.patient.identifier","mustSupport":true},{"id":"Consent.patient.identifier.system","path":"Consent.patient.identifier.system","min":1,"mustSupport":true},{"id":"Consent.patient.identifier.value","path":"Consent.patient.identifier.value","min":1,"mustSupport":true},{"id":"Consent.dateTime","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.dateTime","short":"Erstellungszeitpunkt der Einwilligung","definition":"Dieser Zeitpunkt sollte in der Praxis, zumindest bei vollelektronischer Verarbeitung, identisch mit dem Unterschriftsdatum des Fragebogens sein (Provenance.signature.when des Patienten)","comment":"Dieser Zeitpunkt sollte in der Praxis, zumindest bei vollelektronischer Verarbeitung, identisch mit dem Unterschriftsdatum des Fragebogens sein (Provenance.signature.when des Patienten)","min":1,"mustSupport":true},{"id":"Consent.organization","path":"Consent.organization","short":"Organisation, in der die Einwilligung erfasst wurde.","definition":"Dies ist die Organisation, die den Consent erfasst hat.","mustSupport":true},{"id":"Consent.source[x]","path":"Consent.source[x]","type":[{"code":"Reference","targetProfile":["http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireResponse"]}],"mustSupport":true},{"id":"Consent.source[x].reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.source[x].reference","min":1,"mustSupport":true},{"id":"Consent.policy","path":"Consent.policy","min":1,"mustSupport":true},{"id":"Consent.policy.uri","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Consent.policy.uri","min":1,"mustSupport":true},{"id":"Consent.policyRule","path":"Consent.policyRule","mustSupport":true},{"id":"Consent.policyRule.extension","path":"Consent.policyRule.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"rules":"open"}},{"id":"Consent.policyRule.extension:xacml","path":"Consent.policyRule.extension","sliceName":"xacml","max":"1","type":[{"code":"Extension","profile":["http://fhir.de/ConsentManagement/StructureDefinition/Xacml"]}],"mustSupport":true},{"id":"Consent.provision","path":"Consent.provision","mustSupport":true},{"id":"Consent.provision.type","path":"Consent.provision.type","min":1,"fixedCode":"deny","mustSupport":true},{"id":"Consent.provision.period","path":"Consent.provision.period","min":1,"mustSupport":true},{"id":"Consent.provision.period.start","path":"Consent.provision.period.start","min":1,"mustSupport":true},{"id":"Consent.provision.period.end","path":"Consent.provision.period.end","min":1,"mustSupport":true},{"id":"Consent.provision.action","path":"Consent.provision.action","max":"0"},{"id":"Consent.provision.code","path":"Consent.provision.code","max":"0"},{"id":"Consent.provision.provision","path":"Consent.provision.provision","mustSupport":true},{"id":"Consent.provision.provision.type","path":"Consent.provision.provision.type","min":1,"fixedCode":"permit","mustSupport":true},{"id":"Consent.provision.provision.period","path":"Consent.provision.provision.period","min":1,"mustSupport":true},{"id":"Consent.provision.provision.period.start","path":"Consent.provision.provision.period.start","min":1,"mustSupport":true},{"id":"Consent.provision.provision.period.end","path":"Consent.provision.provision.period.end","min":1,"mustSupport":true},{"id":"Consent.provision.provision.action","path":"Consent.provision.provision.action","max":"0"},{"id":"Consent.provision.provision.code","path":"Consent.provision.provision.code","min":1,"mustSupport":true,"binding":{"strength":"required","valueSet":"https://www.medizininformatik-initiative.de/fhir/modul-consent/ValueSet/mii-vs-consent-policy"}},{"id":"Consent.provision.provision.code.coding","path":"Consent.provision.provision.code.coding","min":1,"mustSupport":true},{"id":"Consent.provision.provision.code.coding.system","path":"Consent.provision.provision.code.coding.system","min":1,"mustSupport":true},{"id":"Consent.provision.provision.code.coding.code","path":"Consent.provision.provision.code.coding.code","min":1,"mustSupport":true},{"id":"Consent.provision.provision.provision","path":"Consent.provision.provision.provision","max":"0"}]}} \ No newline at end of file +{ + "resourceType": "StructureDefinition", + "id": "e0e166b4-0f77-478d-9062-de0034d98ce0", + "url": "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-einwilligung", + "version": "1.0.7", + "name": "MII_PR_Consent_Einwilligung", + "title": "Profile - MI-I - Consent - Einwilligung", + "status": "active", + "date": "2023-05-09", + "description": "Dieses Profil beschreibt eine Einwilligung in der Medizininformatik-Initiative.", + "fhirVersion": "4.0.1", + "mapping": [ + { + "identity": "workflow", + "uri": "http://hl7.org/fhir/workflow", + "name": "Workflow Pattern" + }, + { + "identity": "v2", + "uri": "http://hl7.org/v2", + "name": "HL7 v2 Mapping" + }, + { + "identity": "rim", + "uri": "http://hl7.org/v3", + "name": "RIM Mapping" + }, + { + "identity": "w5", + "uri": "http://hl7.org/fhir/fivews", + "name": "FiveWs Pattern Mapping" + } + ], + "kind": "resource", + "abstract": false, + "type": "Consent", + "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent", + "derivation": "constraint", + "snapshot": { + "element": [ + { + "id": "Consent", + "path": "Consent", + "short": "A healthcare consumer's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time", + "definition": "A record of a healthcare consumer’s choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.", + "comment": "Broadly, there are 3 key areas of consent for patients: Consent around sharing information (aka Privacy Consent Directive - Authorization to Collect, Use, or Disclose information), consent for specific treatment, or kinds of treatment, and general advance care directives.", + "min": 0, + "max": "*", + "base": { + "path": "Consent", + "min": 0, + "max": "*" + }, + "constraint": [ + { + "key": "dom-2", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", + "expression": "contained.contained.empty()", + "xpath": "not(parent::f:contained and f:contained)", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-4", + "severity": "error", + "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", + "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", + "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-3", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource", + "expression": "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()", + "xpath": "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", + "valueBoolean": true + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", + "valueMarkdown": "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time." + } + ], + "key": "dom-6", + "severity": "warning", + "human": "A resource should have narrative for robust management", + "expression": "text.`div`.exists()", + "xpath": "exists(f:text/h:div)", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-5", + "severity": "error", + "human": "If a resource is contained in another resource, it SHALL NOT have a security label", + "expression": "contained.meta.security.empty()", + "xpath": "not(exists(f:contained/*/f:meta/f:security))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "ppc-4", + "severity": "error", + "human": "IF Scope=adr, there must be a patient", + "expression": "patient.exists() or scope.coding.where(system='something' and code='adr').exists().not()", + "xpath": "exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='adr'])))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + }, + { + "key": "ppc-5", + "severity": "error", + "human": "IF Scope=treatment, there must be a patient", + "expression": "patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not()", + "xpath": "exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='treatment'])))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + }, + { + "key": "ppc-2", + "severity": "error", + "human": "IF Scope=privacy, there must be a patient", + "expression": "patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not()", + "xpath": "exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='patient-privacy'])))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + }, + { + "key": "ppc-3", + "severity": "error", + "human": "IF Scope=research, there must be a patient", + "expression": "patient.exists() or scope.coding.where(system='something' and code='research').exists().not()", + "xpath": "exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='research'])))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + }, + { + "key": "ppc-1", + "severity": "error", + "human": "Either a Policy or PolicyRule", + "expression": "policy.exists() or policyRule.exists()", + "xpath": "exists(f:policy) or exists(f:policyRule)", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "Entity. Role, or Act" + }, + { + "identity": "workflow", + "map": "Event" + }, + { + "identity": "v2", + "map": "CON" + }, + { + "identity": "rim", + "map": "FinancialConsent" + } + ] + }, + { + "id": "Consent.id", + "path": "Consent.id", + "short": "Logical id of this artifact", + "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", + "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mustSupport": true, + "isSummary": true + }, + { + "id": "Consent.meta", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.meta", + "short": "Metadata about the resource", + "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.meta", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Meta" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.meta.id", + "path": "Consent.meta.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.meta.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.meta.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.meta.versionId", + "path": "Consent.meta.versionId", + "short": "Version specific identifier", + "definition": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.", + "comment": "The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.", + "min": 0, + "max": "1", + "base": { + "path": "Meta.versionId", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "id" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.meta.lastUpdated", + "path": "Consent.meta.lastUpdated", + "short": "When the resource version last changed", + "definition": "When the resource last changed - e.g. when the version changed.", + "comment": "This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a [read](http.html#read) interaction.", + "min": 0, + "max": "1", + "base": { + "path": "Meta.lastUpdated", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "instant" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.meta.source", + "path": "Consent.meta.source", + "short": "Identifies where the resource comes from", + "definition": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.", + "comment": "In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. \n\nThis element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.", + "min": 0, + "max": "1", + "base": { + "path": "Meta.source", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.meta.profile", + "path": "Consent.meta.profile", + "short": "Profiles this resource claims to conform to", + "definition": "A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).", + "comment": "It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.", + "min": 0, + "max": "*", + "base": { + "path": "Meta.profile", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "canonical", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/StructureDefinition" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.meta.security", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.meta.security", + "short": "Security Labels applied to this resource", + "definition": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.", + "comment": "The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.", + "min": 0, + "max": "*", + "base": { + "path": "Meta.security", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "SecurityLabels" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "extensible", + "description": "Security Labels from the Healthcare Privacy and Security Classification System.", + "valueSet": "http://hl7.org/fhir/ValueSet/security-labels" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + } + ] + }, + { + "id": "Consent.meta.tag", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.meta.tag", + "short": "Tags applied to this resource", + "definition": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.", + "comment": "The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.", + "min": 0, + "max": "*", + "base": { + "path": "Meta.tag", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "Tags" + } + ], + "strength": "example", + "description": "Codes that represent various types of tags, commonly workflow-related; e.g. \"Needs review by Dr. Jones\".", + "valueSet": "http://hl7.org/fhir/ValueSet/common-tags" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + } + ] + }, + { + "id": "Consent.implicitRules", + "path": "Consent.implicitRules", + "short": "A set of rules under which this content was created", + "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", + "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.implicitRules", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": true, + "isModifierReason": "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.language", + "path": "Consent.language", + "short": "Language of the resource content", + "definition": "The base language in which the resource is written.", + "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).", + "min": 0, + "max": "1", + "base": { + "path": "Resource.language", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", + "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "Language" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "preferred", + "description": "A human language.", + "valueSet": "http://hl7.org/fhir/ValueSet/languages" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.text", + "short": "Text summary of the resource, for human interpretation", + "definition": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.", + "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.", + "alias": [ + "narrative", + "html", + "xhtml", + "display" + ], + "min": 0, + "max": "1", + "base": { + "path": "DomainResource.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Narrative" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + }, + { + "identity": "rim", + "map": "Act.text?" + } + ] + }, + { + "id": "Consent.contained", + "path": "Consent.contained", + "short": "Contained, inline Resources", + "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.", + "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.", + "alias": [ + "inline resources", + "anonymous resources", + "contained resources" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.contained", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Resource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "Entity. Role, or Act" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension", + "sliceName": "domainReference", + "short": "Optional Extensions Element", + "definition": "Optional Extension Element - found in all resources.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension", + "profile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/DomainReference" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.id", + "path": "Consent.extension.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension", + "sliceName": "domain", + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 1, + "max": "1", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.id", + "path": "Consent.extension.extension.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.url", + "path": "Consent.extension.extension.url", + "representation": [ + "xmlAttr" + ], + "short": "identifies the meaning of the extension", + "definition": "Source of the definition for the extension code - a logical name or a URL.", + "comment": "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.", + "min": 1, + "max": "1", + "base": { + "path": "Extension.url", + "min": 1, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "uri" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "fixedUri": "domain", + "mapping": [ + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.value[x]", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.value[x]", + "short": "Value of extension", + "definition": "Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", + "min": 1, + "max": "1", + "base": { + "path": "Extension.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Domain/Organization", + "http://fhir.de/ConsentManagement/StructureDefinition/Domain/ResearchStudy" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.value[x].id", + "path": "Consent.extension.extension.value[x].id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.value[x].extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.value[x].extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.value[x].reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.value[x].reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 1, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.value[x].type", + "path": "Consent.extension.extension.value[x].type", + "short": "Type the reference refers to (e.g. \"Patient\")", + "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + "comment": "This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "FHIRResourceTypeExt" + } + ], + "strength": "extensible", + "description": "Aa resource (or, for logical models, the URI of the logical model).", + "valueSet": "http://hl7.org/fhir/ValueSet/resource-types" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.value[x].identifier", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.value[x].identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:domain.value[x].display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.extension.extension.value[x].display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension", + "sliceName": "status", + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "1", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.id", + "path": "Consent.extension.extension.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.url", + "path": "Consent.extension.extension.url", + "representation": [ + "xmlAttr" + ], + "short": "identifies the meaning of the extension", + "definition": "Source of the definition for the extension code - a logical name or a URL.", + "comment": "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.", + "min": 1, + "max": "1", + "base": { + "path": "Extension.url", + "min": 1, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "uri" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "fixedUri": "status", + "mapping": [ + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.value[x]", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.value[x]", + "short": "Value of extension", + "definition": "Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", + "min": 1, + "max": "1", + "base": { + "path": "Extension.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "strength": "required", + "valueSet": "http://hl7.org/fhir/ValueSet/publication-status" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.value[x].id", + "path": "Consent.extension.extension.value[x].id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.value[x].extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.value[x].extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.value[x].system", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.value[x].system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.value[x].version", + "path": "Consent.extension.extension.value[x].version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.value[x].code", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.extension.value[x].code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.value[x].display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.extension.extension.value[x].display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Consent.extension:domainReference.extension:status.value[x].userSelected", + "path": "Consent.extension.extension.value[x].userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Consent.extension:domainReference.url", + "path": "Consent.extension.url", + "representation": [ + "xmlAttr" + ], + "short": "identifies the meaning of the extension", + "definition": "Source of the definition for the extension code - a logical name or a URL.", + "comment": "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.", + "min": 1, + "max": "1", + "base": { + "path": "Extension.url", + "min": 1, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "uri" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "fixedUri": "http://fhir.de/ConsentManagement/StructureDefinition/DomainReference", + "mapping": [ + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.extension:domainReference.value[x]", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.extension.value[x]", + "short": "Value of extension", + "definition": "Value of extension - must be one of a constrained set of the data types (see [Extensibility](extensibility.html) for a list).", + "min": 0, + "max": "0", + "base": { + "path": "Extension.value[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "base64Binary" + }, + { + "code": "boolean" + }, + { + "code": "canonical" + }, + { + "code": "code" + }, + { + "code": "date" + }, + { + "code": "dateTime" + }, + { + "code": "decimal" + }, + { + "code": "id" + }, + { + "code": "instant" + }, + { + "code": "integer" + }, + { + "code": "markdown" + }, + { + "code": "oid" + }, + { + "code": "positiveInt" + }, + { + "code": "string" + }, + { + "code": "time" + }, + { + "code": "unsignedInt" + }, + { + "code": "uri" + }, + { + "code": "url" + }, + { + "code": "uuid" + }, + { + "code": "Address" + }, + { + "code": "Age" + }, + { + "code": "Annotation" + }, + { + "code": "Attachment" + }, + { + "code": "CodeableConcept" + }, + { + "code": "Coding" + }, + { + "code": "ContactPoint" + }, + { + "code": "Count" + }, + { + "code": "Distance" + }, + { + "code": "Duration" + }, + { + "code": "HumanName" + }, + { + "code": "Identifier" + }, + { + "code": "Money" + }, + { + "code": "Period" + }, + { + "code": "Quantity" + }, + { + "code": "Range" + }, + { + "code": "Ratio" + }, + { + "code": "Reference" + }, + { + "code": "SampledData" + }, + { + "code": "Signature" + }, + { + "code": "Timing" + }, + { + "code": "ContactDetail" + }, + { + "code": "Contributor" + }, + { + "code": "DataRequirement" + }, + { + "code": "Expression" + }, + { + "code": "ParameterDefinition" + }, + { + "code": "RelatedArtifact" + }, + { + "code": "TriggerDefinition" + }, + { + "code": "UsageContext" + }, + { + "code": "Dosage" + }, + { + "code": "Meta" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.modifierExtension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Extensions that cannot be ignored", + "definition": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.identifier", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.identifier", + "short": "Identifier for this record (external references)", + "definition": "Unique identifier for this copy of the Consent Statement.", + "comment": "This identifier identifies this copy of the consent. Where this identifier is also used elsewhere as the identifier for a consent record (e.g. a CDA consent document) then the consent details are expected to be the same.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.identifier", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Identifier" + } + ], + "example": [ + { + "label": "General", + "valueIdentifier": { + "system": "urn:ietf:rfc:3986", + "value": "Local eCMS identifier" + } + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "workflow", + "map": "Event.identifier" + }, + { + "identity": "w5", + "map": "FiveWs.identifier" + }, + { + "identity": "rim", + "map": ".id" + } + ] + }, + { + "id": "Consent.status", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.status", + "short": "draft | proposed | active | rejected | inactive | entered-in-error", + "definition": "Indicates the current state of this consent.", + "comment": "This element is labeled as a modifier because the status contains the codes rejected and entered-in-error that mark the Consent as not currently valid.", + "requirements": "The Consent Directive that is pointed to might be in various lifecycle states, e.g., a revoked Consent Directive.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.status", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isModifier": true, + "isModifierReason": "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid", + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentState" + } + ], + "strength": "required", + "description": "Indicates the state of the consent.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-state-codes|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "workflow", + "map": "Event.status" + }, + { + "identity": "w5", + "map": "FiveWs.status" + }, + { + "identity": "v2", + "map": "HL7 Table 0498 - Consent Status" + }, + { + "identity": "rim", + "map": ".statusCode" + } + ] + }, + { + "id": "Consent.scope", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.scope", + "short": "Which of the four areas this resource covers (extensible)", + "definition": "A selector of the type of consent being presented: ADR, Privacy, Treatment, Research. This list is now extensible.", + "comment": "Wird im Kontext des Einwilligungsmanagment-Leitfadens nicht näher definiert.\r\nBei Bedarf kann das ValueSet erweitert oder ggf. ein NullFlavor-Code eingetragen werden.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.scope", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": true, + "isModifierReason": "Allows changes to codes based on scope selection", + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentScope" + } + ], + "strength": "extensible", + "description": "The four anticipated uses for the Consent Resource.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-scope" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + } + ] + }, + { + "id": "Consent.scope.id", + "path": "Consent.scope.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.scope.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.scope.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.scope.coding", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.scope.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.", + "min": 1, + "max": "1", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Consent.scope.coding.id", + "path": "Consent.scope.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.scope.coding.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.scope.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.scope.coding.system", + "path": "Consent.scope.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "fixedUri": "http://terminology.hl7.org/CodeSystem/consentscope", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Consent.scope.coding.version", + "path": "Consent.scope.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Consent.scope.coding.code", + "path": "Consent.scope.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "research", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Consent.scope.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.scope.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Consent.scope.coding.userSelected", + "path": "Consent.scope.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Consent.scope.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.scope.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Consent.category", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.category", + "slicing": { + "discriminator": [ + { + "type": "pattern", + "path": "$this" + } + ], + "rules": "closed" + }, + "short": "Classification of the consent statement - for indexing/retrieval", + "definition": "A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "min": 2, + "max": "2", + "base": { + "path": "Consent.category", + "min": 1, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentCategory" + } + ], + "strength": "extensible", + "description": "A classification of the type of consents found in a consent statement.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-category" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "workflow", + "map": "Event.code" + }, + { + "identity": "w5", + "map": "FiveWs.class" + }, + { + "identity": "v2", + "map": "HL7 Table 0497 - Consent Type" + }, + { + "identity": "rim", + "map": "CNTRCT" + } + ] + }, + { + "id": "Consent.category:loinc", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.category", + "sliceName": "loinc", + "short": "Classification of the consent statement - for indexing/retrieval", + "definition": "A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.category", + "min": 1, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "patternCodeableConcept": { + "coding": [ + { + "system": "http://loinc.org", + "code": "57016-8" + } + ] + }, + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentCategory" + } + ], + "strength": "extensible", + "description": "A classification of the type of consents found in a consent statement.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-category" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "workflow", + "map": "Event.code" + }, + { + "identity": "w5", + "map": "FiveWs.class" + }, + { + "identity": "v2", + "map": "HL7 Table 0497 - Consent Type" + }, + { + "identity": "rim", + "map": "CNTRCT" + } + ] + }, + { + "id": "Consent.category:loinc.id", + "path": "Consent.category.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.category:loinc.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.category.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.category:loinc.coding", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.category.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.", + "min": 1, + "max": "1", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Consent.category:loinc.coding.id", + "path": "Consent.category.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.category:loinc.coding.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.category.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.category:loinc.coding.system", + "path": "Consent.category.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Consent.category:loinc.coding.version", + "path": "Consent.category.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Consent.category:loinc.coding.code", + "path": "Consent.category.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Consent.category:loinc.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.category.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Consent.category:loinc.coding.userSelected", + "path": "Consent.category.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Consent.category:loinc.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.category.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Consent.category:mii", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.category", + "sliceName": "mii", + "short": "Classification of the consent statement - for indexing/retrieval", + "definition": "A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.category", + "min": 1, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "patternCodeableConcept": { + "coding": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.2.184" + } + ] + }, + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentCategory" + } + ], + "strength": "extensible", + "description": "A classification of the type of consents found in a consent statement.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-category" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "workflow", + "map": "Event.code" + }, + { + "identity": "w5", + "map": "FiveWs.class" + }, + { + "identity": "v2", + "map": "HL7 Table 0497 - Consent Type" + }, + { + "identity": "rim", + "map": "CNTRCT" + } + ] + }, + { + "id": "Consent.category:mii.id", + "path": "Consent.category.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.category:mii.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.category.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.category:mii.coding", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.category.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.", + "min": 1, + "max": "1", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "patternCoding": { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-consent/CodeSystem/mii-cs-consent-consent_category" + }, + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Consent.category:mii.coding.id", + "path": "Consent.category.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.category:mii.coding.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.category.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.category:mii.coding.system", + "path": "Consent.category.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Consent.category:mii.coding.version", + "path": "Consent.category.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Consent.category:mii.coding.code", + "path": "Consent.category.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Consent.category:mii.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.category.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Consent.category:mii.coding.userSelected", + "path": "Consent.category.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Consent.category:mii.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.category.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Consent.patient", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.patient", + "short": "Who the consent applies to", + "definition": "The patient/healthcare consumer to whom this consent applies.", + "comment": "Commonly, the patient the consent pertains to is the author, but for young and old people, it may be some other person.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.patient", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Patient" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.subject" + }, + { + "identity": "w5", + "map": "FiveWs.subject[x]" + }, + { + "identity": "rim", + "map": "Role" + }, + { + "identity": "w5", + "map": "FiveWs.subject" + } + ] + }, + { + "id": "Consent.patient.id", + "path": "Consent.patient.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.patient.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.patient.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.patient.reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.patient.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.patient.type", + "path": "Consent.patient.type", + "short": "Type the reference refers to (e.g. \"Patient\")", + "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + "comment": "This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "FHIRResourceTypeExt" + } + ], + "strength": "extensible", + "description": "Aa resource (or, for logical models, the URI of the logical model).", + "valueSet": "http://hl7.org/fhir/ValueSet/resource-types" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.patient.identifier", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.patient.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Consent.patient.identifier.id", + "path": "Consent.patient.identifier.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.patient.identifier.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.patient.identifier.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.patient.identifier.use", + "path": "Consent.patient.identifier.use", + "short": "usual | official | temp | secondary | old (If known)", + "definition": "The purpose of this identifier.", + "comment": "Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.", + "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.use", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": true, + "isModifierReason": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one.", + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "IdentifierUse" + } + ], + "strength": "required", + "description": "Identifies the purpose for this identifier, if known .", + "valueSet": "http://hl7.org/fhir/ValueSet/identifier-use|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "N/A" + }, + { + "identity": "rim", + "map": "Role.code or implied by context" + } + ] + }, + { + "id": "Consent.patient.identifier.type", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.patient.identifier.type", + "short": "Description of identifier", + "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + "comment": "This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.", + "requirements": "Allows users to make use of identifiers when the identifier system is not known.", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "IdentifierType" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "extensible", + "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.", + "valueSet": "http://hl7.org/fhir/ValueSet/identifier-type" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "v2", + "map": "CX.5" + }, + { + "identity": "rim", + "map": "Role.code or implied by context" + } + ] + }, + { + "id": "Consent.patient.identifier.system", + "path": "Consent.patient.identifier.system", + "short": "The namespace for the identifier value", + "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + "comment": "Identifier.system is always case sensitive.", + "requirements": "There are many sets of identifiers. To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.", + "min": 1, + "max": "1", + "base": { + "path": "Identifier.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "example": [ + { + "label": "General", + "valueUri": "http://www.acme.com/identifiers/patient" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX.4 / EI-2-4" + }, + { + "identity": "rim", + "map": "II.root or Role.id.root" + }, + { + "identity": "servd", + "map": "./IdentifierType" + } + ] + }, + { + "id": "Consent.patient.identifier.value", + "path": "Consent.patient.identifier.value", + "short": "The value that is unique", + "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", + "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986. The value's primary purpose is computational mapping. As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.) A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.", + "min": 1, + "max": "1", + "base": { + "path": "Identifier.value", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "example": [ + { + "label": "General", + "valueString": "123456" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX.1 / EI.1" + }, + { + "identity": "rim", + "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)" + }, + { + "identity": "servd", + "map": "./Value" + } + ] + }, + { + "id": "Consent.patient.identifier.period", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.patient.identifier.period", + "short": "Time period when id is/was valid for use", + "definition": "Time period during which identifier is/was valid for use.", + "comment": "A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.period", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Period" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "per-1", + "severity": "error", + "human": "If present, start SHALL have a lower value than end", + "expression": "start.hasValue().not() or end.hasValue().not() or (start <= end)", + "xpath": "not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR" + }, + { + "identity": "rim", + "map": "IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]" + }, + { + "identity": "v2", + "map": "CX.7 + CX.8" + }, + { + "identity": "rim", + "map": "Role.effectiveTime or implied by context" + }, + { + "identity": "servd", + "map": "./StartDate and ./EndDate" + } + ] + }, + { + "id": "Consent.patient.identifier.assigner", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.patient.identifier.assigner", + "short": "Organization that issued id (may be just text)", + "definition": "Organization that issued/manages the identifier.", + "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.", + "min": 0, + "max": "1", + "base": { + "path": "Identifier.assigner", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Organization" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "v2", + "map": "CX.4 / (CX.4,CX.9,CX.10)" + }, + { + "identity": "rim", + "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper" + }, + { + "identity": "servd", + "map": "./IdentifierIssuingAuthority" + } + ] + }, + { + "id": "Consent.patient.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.patient.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.dateTime", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.dateTime", + "short": "Erstellungszeitpunkt der Einwilligung", + "definition": "Dieser Zeitpunkt sollte in der Praxis, zumindest bei vollelektronischer Verarbeitung, identisch mit dem Unterschriftsdatum des Fragebogens sein (Provenance.signature.when des Patienten)", + "comment": "Dieser Zeitpunkt sollte in der Praxis, zumindest bei vollelektronischer Verarbeitung, identisch mit dem Unterschriftsdatum des Fragebogens sein (Provenance.signature.when des Patienten)", + "min": 1, + "max": "1", + "base": { + "path": "Consent.dateTime", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "workflow", + "map": "Event.occurrence[x]" + }, + { + "identity": "w5", + "map": "FiveWs.recorded" + }, + { + "identity": "v2", + "map": "Field 13/ Consent Decision Date" + }, + { + "identity": "rim", + "map": "FinancialConsent effectiveTime" + } + ] + }, + { + "id": "Consent.performer", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.performer", + "short": "Who is agreeing to the policy and rules", + "definition": "Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.", + "comment": "Commonly, the patient the consent pertains to is the consentor, but particularly for young and old people, it may be some other person - e.g. a legal guardian.", + "alias": [ + "consentor" + ], + "min": 0, + "max": "*", + "base": { + "path": "Consent.performer", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Organization", + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.performer" + }, + { + "identity": "w5", + "map": "FiveWs.actor" + }, + { + "identity": "v2", + "map": "Field 24/ ConsenterID" + } + ] + }, + { + "id": "Consent.organization", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.organization", + "short": "Organisation, in der die Einwilligung erfasst wurde.", + "definition": "Dies ist die Organisation, die den Consent erfasst hat.", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "alias": [ + "custodian" + ], + "min": 0, + "max": "*", + "base": { + "path": "Consent.organization", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Organization" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.performer" + }, + { + "identity": "w5", + "map": "FiveWs.witness" + } + ] + }, + { + "id": "Consent.source[x]", + "path": "Consent.source[x]", + "short": "Source from which this consent is taken", + "definition": "The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.", + "comment": "The source can be contained inline (Attachment), referenced directly (Consent), referenced in a consent repository (DocumentReference), or simply by an identifier (Identifier), e.g. a CDA document id.", + "min": 0, + "max": "1", + "base": { + "path": "Consent.source[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireResponse" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Field 19 Informational Material Supplied Indicator" + } + ] + }, + { + "id": "Consent.source[x].id", + "path": "Consent.source[x].id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.source[x].extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.source[x].extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.source[x].reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.source[x].reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 1, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.source[x].type", + "path": "Consent.source[x].type", + "short": "Type the reference refers to (e.g. \"Patient\")", + "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + "comment": "This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "FHIRResourceTypeExt" + } + ], + "strength": "extensible", + "description": "Aa resource (or, for logical models, the URI of the logical model).", + "valueSet": "http://hl7.org/fhir/ValueSet/resource-types" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.source[x].identifier", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.source[x].identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Consent.source[x].display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.source[x].display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.policy", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.policy", + "short": "Policies covered by this consent", + "definition": "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", + "min": 1, + "max": "*", + "base": { + "path": "Consent.policy", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.policy.id", + "path": "Consent.policy.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.policy.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.policy.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.policy.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.policy.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.policy.authority", + "path": "Consent.policy.authority", + "short": "Enforcement source for policy", + "definition": "Entity or Organization having regulatory jurisdiction or accountability for enforcing policies pertaining to Consent Directives.", + "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier", + "min": 0, + "max": "1", + "base": { + "path": "Consent.policy.authority", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1", + "ppc-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.policy.uri", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.policy.uri", + "short": "Specific policy covered by this consent", + "definition": "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.", + "comment": "This element is for discoverability / documentation and does not modify or qualify the policy rules.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.policy.uri", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1", + "ppc-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.policyRule", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.policyRule", + "short": "Regulation that this consents to", + "definition": "A reference to the specific base computable regulation or policy.", + "comment": "If the policyRule is absent, computable consent would need to be constructed from the elements of the Consent resource.", + "requirements": "Might be a unique identifier of a policy set in XACML, or other rules engine.", + "min": 0, + "max": "1", + "base": { + "path": "Consent.policyRule", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1", + "ppc-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentPolicyRule" + } + ], + "strength": "extensible", + "description": "Regulatory policy examples.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-policy" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + } + ] + }, + { + "id": "Consent.policyRule.id", + "path": "Consent.policyRule.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.policyRule.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.policyRule.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.policyRule.extension:xacml", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.policyRule.extension", + "sliceName": "xacml", + "short": "Optional Extensions Element", + "definition": "Optional Extension Element - found in all resources.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "1", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension", + "profile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Xacml" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.policyRule.coding", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.policyRule.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.", + "min": 0, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Consent.policyRule.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.policyRule.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Consent.verification", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.verification", + "short": "Consent Verified by patient or family", + "definition": "Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.verification", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.verification.id", + "path": "Consent.verification.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.verification.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.verification.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.verification.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.verification.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.verification.verified", + "path": "Consent.verification.verified", + "short": "Has been verified", + "definition": "Has the instruction been verified.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.verification.verified", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.verification.verifiedWith", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.verification.verifiedWith", + "short": "Person who verified", + "definition": "Who verified the instruction (Patient, Relative or other Authorized Person).", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 0, + "max": "1", + "base": { + "path": "Consent.verification.verifiedWith", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + } + ] + }, + { + "id": "Consent.verification.verificationDate", + "path": "Consent.verification.verificationDate", + "short": "When consent verified", + "definition": "Date verification was collected.", + "min": 0, + "max": "1", + "base": { + "path": "Consent.verification.verificationDate", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", + "valueString": "provision" + } + ], + "path": "Consent.provision", + "short": "Constraints to the base Consent.policyRule", + "definition": "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.", + "min": 0, + "max": "1", + "base": { + "path": "Consent.provision", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.id", + "path": "Consent.provision.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.type", + "path": "Consent.provision.type", + "short": "deny | permit", + "definition": "Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "deny", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentProvisionType" + } + ], + "strength": "required", + "description": "How a rule statement is applied, such as adding additional consent or removing consent.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.period", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.period", + "short": "Timeframe for this rule", + "definition": "The timeframe in this rule is valid.", + "comment": "A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.period", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Period" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "per-1", + "severity": "error", + "human": "If present, start SHALL have a lower value than end", + "expression": "start.hasValue().not() or end.hasValue().not() or (start <= end)", + "xpath": "not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR" + }, + { + "identity": "rim", + "map": "IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]" + } + ] + }, + { + "id": "Consent.provision.period.id", + "path": "Consent.provision.period.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.period.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.period.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.period.start", + "path": "Consent.provision.period.start", + "short": "Starting time with inclusive boundary", + "definition": "The start of the period. The boundary is inclusive.", + "comment": "If the low element is missing, the meaning is that the low boundary is not known.", + "min": 1, + "max": "1", + "base": { + "path": "Period.start", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + } + ], + "condition": [ + "ele-1", + "per-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR.1" + }, + { + "identity": "rim", + "map": "./low" + } + ] + }, + { + "id": "Consent.provision.period.end", + "path": "Consent.provision.period.end", + "short": "End time with inclusive boundary, if not ongoing", + "definition": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", + "comment": "The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03.", + "min": 1, + "max": "1", + "base": { + "path": "Period.end", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + } + ], + "meaningWhenMissing": "If the end of the period is missing, it means that the period is ongoing", + "condition": [ + "ele-1", + "per-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR.2" + }, + { + "identity": "rim", + "map": "./high" + } + ] + }, + { + "id": "Consent.provision.actor", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", + "valueString": "provisionActor" + } + ], + "path": "Consent.provision.actor", + "short": "Who|what controlled by this rule (or group, by role)", + "definition": "Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.actor", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "meaningWhenMissing": "There is no specific actor associated with the exception", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.actor.id", + "path": "Consent.provision.actor.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.actor.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.actor.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.actor.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.actor.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.actor.role", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.actor.role", + "short": "How the actor is involved", + "definition": "How the individual is involved in the resources content that is described in the exception.", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.actor.role", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentActorRole" + } + ], + "strength": "extensible", + "description": "How an actor is involved in the consent considerations.", + "valueSet": "http://hl7.org/fhir/ValueSet/security-role-type" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + } + ] + }, + { + "id": "Consent.provision.actor.reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.actor.reference", + "short": "Resource for the actor (or group, by role)", + "definition": "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.actor.reference", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Device", + "http://hl7.org/fhir/StructureDefinition/Group", + "http://hl7.org/fhir/StructureDefinition/CareTeam", + "http://hl7.org/fhir/StructureDefinition/Organization", + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + } + ] + }, + { + "id": "Consent.provision.action", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.action", + "short": "Actions controlled by this rule", + "definition": "Actions controlled by this Rule.", + "comment": "Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.", + "min": 0, + "max": "0", + "base": { + "path": "Consent.provision.action", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "meaningWhenMissing": "all actions", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentAction" + } + ], + "strength": "example", + "description": "Detailed codes for the consent action.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-action" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + } + ] + }, + { + "id": "Consent.provision.securityLabel", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.securityLabel", + "short": "Security Labels that define affected resources", + "definition": "A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.", + "comment": "If the consent specifies a security label of \"R\" then it applies to all resources that are labeled \"R\" or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. When the purpose of use tag is on the data, access request purpose of use shall not conflict.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.securityLabel", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "SecurityLabels" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "extensible", + "description": "Security Labels from the Healthcare Privacy and Security Classification System.", + "valueSet": "http://hl7.org/fhir/ValueSet/security-labels" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + } + ] + }, + { + "id": "Consent.provision.purpose", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.purpose", + "short": "Context of activities covered by this rule", + "definition": "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.", + "comment": "When the purpose of use tag is on the data, access request purpose of use shall not conflict.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.purpose", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "PurposeOfUse" + } + ], + "strength": "extensible", + "description": "What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels.", + "valueSet": "http://terminology.hl7.org/ValueSet/v3-PurposeOfUse" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + } + ] + }, + { + "id": "Consent.provision.class", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.class", + "short": "e.g. Resource Type, Profile, CDA, etc.", + "definition": "The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.", + "comment": "Multiple types are or'ed together. The intention of the contentType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.class", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentContentClass" + } + ], + "strength": "extensible", + "description": "The class (type) of information a consent rule covers.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-content-class" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + } + ] + }, + { + "id": "Consent.provision.code", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.code", + "short": "e.g. LOINC or SNOMED CT code, etc. in the content", + "definition": "If this code is found in an instance, then the rule applies.", + "comment": "Typical use of this is a Document code with class = CDA.", + "min": 0, + "max": "0", + "base": { + "path": "Consent.provision.code", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentContentCode" + } + ], + "strength": "example", + "description": "If this code is found in an instance, then the exception applies.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-content-code" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + } + ] + }, + { + "id": "Consent.provision.dataPeriod", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.dataPeriod", + "short": "Timeframe for data controlled by this rule", + "definition": "Clinical or Operational Relevant period of time that bounds the data controlled by this rule.", + "comment": "This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement.", + "min": 0, + "max": "1", + "base": { + "path": "Consent.provision.dataPeriod", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Period" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "per-1", + "severity": "error", + "human": "If present, start SHALL have a lower value than end", + "expression": "start.hasValue().not() or end.hasValue().not() or (start <= end)", + "xpath": "not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR" + }, + { + "identity": "rim", + "map": "IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]" + } + ] + }, + { + "id": "Consent.provision.data", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", + "valueString": "provisionData" + } + ], + "path": "Consent.provision.data", + "short": "Data controlled by this rule", + "definition": "The resources controlled by this rule if specific resources are referenced.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.data", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "meaningWhenMissing": "all data", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "Role" + } + ] + }, + { + "id": "Consent.provision.data.id", + "path": "Consent.provision.data.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.data.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.data.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.data.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.data.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.data.meaning", + "path": "Consent.provision.data.meaning", + "short": "instance | related | dependents | authoredby", + "definition": "How the resource reference is interpreted when testing consent restrictions.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.data.meaning", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentDataMeaning" + } + ], + "strength": "required", + "description": "How a resource reference is interpreted when testing consent restrictions.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.data.reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.data.reference", + "short": "The actual data reference", + "definition": "A reference to a specific resource that defines which resources are covered by this consent.", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.data.reference", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Resource" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + } + ] + }, + { + "id": "Consent.provision.provision", + "path": "Consent.provision.provision", + "short": "Nested Exception Rules", + "definition": "Rules which provide exceptions to the base rule or subrules.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.provision", + "min": 0, + "max": "*" + }, + "contentReference": "http://hl7.org/fhir/StructureDefinition/Consent#Consent.provision", + "mustSupport": true + }, + { + "id": "Consent.provision.provision.id", + "path": "Consent.provision.provision.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.provision.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.provision.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.provision.type", + "path": "Consent.provision.provision.type", + "short": "deny | permit", + "definition": "Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "permit", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentProvisionType" + } + ], + "strength": "required", + "description": "How a rule statement is applied, such as adding additional consent or removing consent.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.provision.period", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.period", + "short": "Timeframe for this rule", + "definition": "The timeframe in this rule is valid.", + "comment": "A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](datatypes.html#Duration).", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.period", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Period" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "per-1", + "severity": "error", + "human": "If present, start SHALL have a lower value than end", + "expression": "start.hasValue().not() or end.hasValue().not() or (start <= end)", + "xpath": "not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR" + }, + { + "identity": "rim", + "map": "IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]" + } + ] + }, + { + "id": "Consent.provision.provision.period.id", + "path": "Consent.provision.provision.period.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.provision.period.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.period.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.provision.period.start", + "path": "Consent.provision.provision.period.start", + "short": "Starting time with inclusive boundary", + "definition": "The start of the period. The boundary is inclusive.", + "comment": "If the low element is missing, the meaning is that the low boundary is not known.", + "min": 1, + "max": "1", + "base": { + "path": "Period.start", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + } + ], + "condition": [ + "ele-1", + "per-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR.1" + }, + { + "identity": "rim", + "map": "./low" + } + ] + }, + { + "id": "Consent.provision.provision.period.end", + "path": "Consent.provision.provision.period.end", + "short": "End time with inclusive boundary, if not ongoing", + "definition": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", + "comment": "The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03.", + "min": 1, + "max": "1", + "base": { + "path": "Period.end", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "dateTime" + } + ], + "meaningWhenMissing": "If the end of the period is missing, it means that the period is ongoing", + "condition": [ + "ele-1", + "per-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR.2" + }, + { + "identity": "rim", + "map": "./high" + } + ] + }, + { + "id": "Consent.provision.provision.actor", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", + "valueString": "provisionActor" + } + ], + "path": "Consent.provision.provision.actor", + "short": "Who|what controlled by this rule (or group, by role)", + "definition": "Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.actor", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "meaningWhenMissing": "There is no specific actor associated with the exception", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.provision.actor.id", + "path": "Consent.provision.provision.actor.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.provision.actor.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.actor.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.provision.actor.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.actor.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.provision.actor.role", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.actor.role", + "short": "How the actor is involved", + "definition": "How the individual is involved in the resources content that is described in the exception.", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.actor.role", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentActorRole" + } + ], + "strength": "extensible", + "description": "How an actor is involved in the consent considerations.", + "valueSet": "http://hl7.org/fhir/ValueSet/security-role-type" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + } + ] + }, + { + "id": "Consent.provision.provision.actor.reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.actor.reference", + "short": "Resource for the actor (or group, by role)", + "definition": "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.actor.reference", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Device", + "http://hl7.org/fhir/StructureDefinition/Group", + "http://hl7.org/fhir/StructureDefinition/CareTeam", + "http://hl7.org/fhir/StructureDefinition/Organization", + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + } + ] + }, + { + "id": "Consent.provision.provision.action", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.action", + "short": "Actions controlled by this rule", + "definition": "Actions controlled by this Rule.", + "comment": "Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.", + "min": 0, + "max": "0", + "base": { + "path": "Consent.provision.action", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "meaningWhenMissing": "all actions", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentAction" + } + ], + "strength": "example", + "description": "Detailed codes for the consent action.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-action" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + } + ] + }, + { + "id": "Consent.provision.provision.securityLabel", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.securityLabel", + "short": "Security Labels that define affected resources", + "definition": "A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.", + "comment": "If the consent specifies a security label of \"R\" then it applies to all resources that are labeled \"R\" or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. When the purpose of use tag is on the data, access request purpose of use shall not conflict.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.securityLabel", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "SecurityLabels" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "extensible", + "description": "Security Labels from the Healthcare Privacy and Security Classification System.", + "valueSet": "http://hl7.org/fhir/ValueSet/security-labels" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + } + ] + }, + { + "id": "Consent.provision.provision.purpose", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.purpose", + "short": "Context of activities covered by this rule", + "definition": "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.", + "comment": "When the purpose of use tag is on the data, access request purpose of use shall not conflict.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.purpose", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "PurposeOfUse" + } + ], + "strength": "extensible", + "description": "What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels.", + "valueSet": "http://terminology.hl7.org/ValueSet/v3-PurposeOfUse" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + } + ] + }, + { + "id": "Consent.provision.provision.class", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.class", + "short": "e.g. Resource Type, Profile, CDA, etc.", + "definition": "The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.", + "comment": "Multiple types are or'ed together. The intention of the contentType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.class", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentContentClass" + } + ], + "strength": "extensible", + "description": "The class (type) of information a consent rule covers.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-content-class" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + } + ] + }, + { + "id": "Consent.provision.provision.code", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.code", + "short": "e.g. LOINC or SNOMED CT code, etc. in the content", + "definition": "If this code is found in an instance, then the rule applies.", + "comment": "Typical use of this is a Document code with class = CDA.", + "min": 1, + "max": "*", + "base": { + "path": "Consent.provision.code", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentContentCode" + } + ], + "strength": "required", + "description": "If this code is found in an instance, then the exception applies.", + "valueSet": "https://www.medizininformatik-initiative.de/fhir/modul-consent/ValueSet/mii-vs-consent-policy" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + } + ] + }, + { + "id": "Consent.provision.provision.code.id", + "path": "Consent.provision.provision.code.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.provision.code.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.code.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.provision.code.coding", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.code.coding", + "short": "Code defined by a terminology system", + "definition": "A reference to a code defined by a terminology system.", + "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.", + "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.", + "min": 1, + "max": "*", + "base": { + "path": "CodeableConcept.coding", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + }, + { + "identity": "v2", + "map": "C*E.1-8, C*E.10-22" + }, + { + "identity": "rim", + "map": "union(., ./translation)" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding" + } + ] + }, + { + "id": "Consent.provision.provision.code.coding.id", + "path": "Consent.provision.provision.code.coding.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.provision.code.coding.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.code.coding.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.provision.code.coding.system", + "path": "Consent.provision.provision.code.coding.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Consent.provision.provision.code.coding.version", + "path": "Consent.provision.provision.code.coding.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Consent.provision.provision.code.coding.code", + "path": "Consent.provision.provision.code.coding.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Consent.provision.provision.code.coding.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.provision.provision.code.coding.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Consent.provision.provision.code.coding.userSelected", + "path": "Consent.provision.provision.code.coding.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Consent.provision.provision.code.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Consent.provision.provision.code.text", + "short": "Plain text representation of the concept", + "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + "comment": "Very often the text is the same as a displayName of one of the codings.", + "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.", + "min": 0, + "max": "1", + "base": { + "path": "CodeableConcept.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.9. But note many systems use C*E.2 for this" + }, + { + "identity": "rim", + "map": "./originalText[mediaType/code=\"text/plain\"]/data" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText" + } + ] + }, + { + "id": "Consent.provision.provision.dataPeriod", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.dataPeriod", + "short": "Timeframe for data controlled by this rule", + "definition": "Clinical or Operational Relevant period of time that bounds the data controlled by this rule.", + "comment": "This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement.", + "min": 0, + "max": "1", + "base": { + "path": "Consent.provision.dataPeriod", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Period" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "per-1", + "severity": "error", + "human": "If present, start SHALL have a lower value than end", + "expression": "start.hasValue().not() or end.hasValue().not() or (start <= end)", + "xpath": "not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))", + "source": "http://hl7.org/fhir/StructureDefinition/Consent" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "DR" + }, + { + "identity": "rim", + "map": "IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]" + } + ] + }, + { + "id": "Consent.provision.provision.data", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name", + "valueString": "provisionData" + } + ], + "path": "Consent.provision.provision.data", + "short": "Data controlled by this rule", + "definition": "The resources controlled by this rule if specific resources are referenced.", + "min": 0, + "max": "*", + "base": { + "path": "Consent.provision.data", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "meaningWhenMissing": "all data", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "Role" + } + ] + }, + { + "id": "Consent.provision.provision.data.id", + "path": "Consent.provision.provision.data.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.provision.data.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.data.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.provision.data.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.data.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Consent.provision.provision.data.meaning", + "path": "Consent.provision.provision.data.meaning", + "short": "instance | related | dependents | authoredby", + "definition": "How the resource reference is interpreted when testing consent restrictions.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.data.meaning", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ConsentDataMeaning" + } + ], + "strength": "required", + "description": "How a resource reference is interpreted when testing consent restrictions.", + "valueSet": "http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Consent.provision.provision.data.reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.provision.provision.data.reference", + "short": "The actual data reference", + "definition": "A reference to a specific resource that defines which resources are covered by this consent.", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 1, + "max": "1", + "base": { + "path": "Consent.provision.data.reference", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Resource" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + } + ] + }, + { + "id": "Consent.provision.provision.provision", + "path": "Consent.provision.provision.provision", + "short": "Nested Exception Rules", + "definition": "Rules which provide exceptions to the base rule or subrules.", + "min": 0, + "max": "0", + "base": { + "path": "Consent.provision.provision", + "min": 0, + "max": "*" + }, + "contentReference": "http://hl7.org/fhir/StructureDefinition/Consent#Consent.provision" + } + ] + }, + "differential": { + "element": [ + { + "id": "Consent.id", + "path": "Consent.id", + "mustSupport": true + }, + { + "id": "Consent.meta", + "path": "Consent.meta", + "mustSupport": true + }, + { + "id": "Consent.meta.source", + "path": "Consent.meta.source", + "mustSupport": true + }, + { + "id": "Consent.meta.profile", + "path": "Consent.meta.profile", + "mustSupport": true + }, + { + "id": "Consent.extension", + "path": "Consent.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "rules": "open" + } + }, + { + "id": "Consent.extension:domainReference", + "path": "Consent.extension", + "sliceName": "domainReference", + "type": [ + { + "code": "Extension", + "profile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/DomainReference" + ] + } + ], + "mustSupport": true + }, + { + "id": "Consent.extension:domainReference.extension", + "path": "Consent.extension.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "rules": "open" + } + }, + { + "id": "Consent.extension:domainReference.extension:domain", + "path": "Consent.extension.extension", + "sliceName": "domain", + "mustSupport": true + }, + { + "id": "Consent.status", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.status", + "mustSupport": true + }, + { + "id": "Consent.scope", + "path": "Consent.scope", + "comment": "Wird im Kontext des Einwilligungsmanagment-Leitfadens nicht näher definiert.\r\nBei Bedarf kann das ValueSet erweitert oder ggf. ein NullFlavor-Code eingetragen werden." + }, + { + "id": "Consent.scope.coding", + "path": "Consent.scope.coding", + "min": 1, + "max": "1" + }, + { + "id": "Consent.scope.coding.system", + "path": "Consent.scope.coding.system", + "min": 1, + "fixedUri": "http://terminology.hl7.org/CodeSystem/consentscope" + }, + { + "id": "Consent.scope.coding.code", + "path": "Consent.scope.coding.code", + "min": 1, + "fixedCode": "research" + }, + { + "id": "Consent.category", + "path": "Consent.category", + "slicing": { + "discriminator": [ + { + "type": "pattern", + "path": "$this" + } + ], + "rules": "closed" + }, + "min": 2, + "max": "2", + "mustSupport": true + }, + { + "id": "Consent.category:loinc", + "path": "Consent.category", + "sliceName": "loinc", + "min": 1, + "max": "1", + "patternCodeableConcept": { + "coding": [ + { + "system": "http://loinc.org", + "code": "57016-8" + } + ] + }, + "mustSupport": true + }, + { + "id": "Consent.category:loinc.coding", + "path": "Consent.category.coding", + "min": 1, + "max": "1", + "mustSupport": true + }, + { + "id": "Consent.category:loinc.coding.system", + "path": "Consent.category.coding.system", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.category:loinc.coding.code", + "path": "Consent.category.coding.code", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.category:mii", + "path": "Consent.category", + "sliceName": "mii", + "min": 1, + "max": "1", + "patternCodeableConcept": { + "coding": [ + { + "code": "2.16.840.1.113883.3.1937.777.24.2.184" + } + ] + }, + "mustSupport": true + }, + { + "id": "Consent.category:mii.coding", + "path": "Consent.category.coding", + "min": 1, + "max": "1", + "patternCoding": { + "system": "https://www.medizininformatik-initiative.de/fhir/modul-consent/CodeSystem/mii-cs-consent-consent_category" + }, + "mustSupport": true + }, + { + "id": "Consent.category:mii.coding.system", + "path": "Consent.category.coding.system", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.category:mii.coding.code", + "path": "Consent.category.coding.code", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.patient", + "path": "Consent.patient", + "min": 1, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Patient" + ] + } + ], + "mustSupport": true + }, + { + "id": "Consent.patient.reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.patient.reference", + "mustSupport": true + }, + { + "id": "Consent.patient.identifier", + "path": "Consent.patient.identifier", + "mustSupport": true + }, + { + "id": "Consent.patient.identifier.system", + "path": "Consent.patient.identifier.system", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.patient.identifier.value", + "path": "Consent.patient.identifier.value", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.dateTime", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.dateTime", + "short": "Erstellungszeitpunkt der Einwilligung", + "definition": "Dieser Zeitpunkt sollte in der Praxis, zumindest bei vollelektronischer Verarbeitung, identisch mit dem Unterschriftsdatum des Fragebogens sein (Provenance.signature.when des Patienten)", + "comment": "Dieser Zeitpunkt sollte in der Praxis, zumindest bei vollelektronischer Verarbeitung, identisch mit dem Unterschriftsdatum des Fragebogens sein (Provenance.signature.when des Patienten)", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.organization", + "path": "Consent.organization", + "short": "Organisation, in der die Einwilligung erfasst wurde.", + "definition": "Dies ist die Organisation, die den Consent erfasst hat.", + "mustSupport": true + }, + { + "id": "Consent.source[x]", + "path": "Consent.source[x]", + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireResponse" + ] + } + ], + "mustSupport": true + }, + { + "id": "Consent.source[x].reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.source[x].reference", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.policy", + "path": "Consent.policy", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.policy.uri", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Consent.policy.uri", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.policyRule", + "path": "Consent.policyRule", + "mustSupport": true + }, + { + "id": "Consent.policyRule.extension", + "path": "Consent.policyRule.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "rules": "open" + } + }, + { + "id": "Consent.policyRule.extension:xacml", + "path": "Consent.policyRule.extension", + "sliceName": "xacml", + "max": "1", + "type": [ + { + "code": "Extension", + "profile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/Xacml" + ] + } + ], + "mustSupport": true + }, + { + "id": "Consent.provision", + "path": "Consent.provision", + "mustSupport": true + }, + { + "id": "Consent.provision.type", + "path": "Consent.provision.type", + "min": 1, + "fixedCode": "deny", + "mustSupport": true + }, + { + "id": "Consent.provision.period", + "path": "Consent.provision.period", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.provision.period.start", + "path": "Consent.provision.period.start", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.provision.period.end", + "path": "Consent.provision.period.end", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.provision.action", + "path": "Consent.provision.action", + "max": "0" + }, + { + "id": "Consent.provision.code", + "path": "Consent.provision.code", + "max": "0" + }, + { + "id": "Consent.provision.provision", + "path": "Consent.provision.provision", + "mustSupport": true + }, + { + "id": "Consent.provision.provision.type", + "path": "Consent.provision.provision.type", + "min": 1, + "fixedCode": "permit", + "mustSupport": true + }, + { + "id": "Consent.provision.provision.period", + "path": "Consent.provision.provision.period", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.provision.provision.period.start", + "path": "Consent.provision.provision.period.start", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.provision.provision.period.end", + "path": "Consent.provision.provision.period.end", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.provision.provision.action", + "path": "Consent.provision.provision.action", + "max": "0" + }, + { + "id": "Consent.provision.provision.code", + "path": "Consent.provision.provision.code", + "min": 1, + "mustSupport": true, + "binding": { + "strength": "required", + "valueSet": "https://www.medizininformatik-initiative.de/fhir/modul-consent/ValueSet/mii-vs-consent-policy" + } + }, + { + "id": "Consent.provision.provision.code.coding", + "path": "Consent.provision.provision.code.coding", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.provision.provision.code.coding.system", + "path": "Consent.provision.provision.code.coding.system", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.provision.provision.code.coding.code", + "path": "Consent.provision.provision.code.coding.code", + "min": 1, + "mustSupport": true + }, + { + "id": "Consent.provision.provision.provision", + "path": "Consent.provision.provision.provision", + "max": "0" + } + ] + } +} \ No newline at end of file diff --git a/structureDefinitions/Profile_MII_Consent_Provenance.json b/structureDefinitions/Profile_MII_Consent_Provenance.json index 1e537bd..85976b6 100644 --- a/structureDefinitions/Profile_MII_Consent_Provenance.json +++ b/structureDefinitions/Profile_MII_Consent_Provenance.json @@ -1 +1,3708 @@ -{"resourceType":"StructureDefinition","id":"f675b1e8-9f3f-44e8-bb59-9681f78eb464","url":"https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-provenance","version":"1.0.7","name":"MII_PR_Consent_Provenance","title":"Profile - MI-I - Consent - Provenance","status":"active","date":"2023-05-09","description":"Dieses Profil beschreibt Herkunftsinformationen zu Einwilligungen in der Medizininformatik-Initiative.","fhirVersion":"4.0.1","mapping":[{"identity":"workflow","uri":"http://hl7.org/fhir/workflow","name":"Workflow Pattern"},{"identity":"rim","uri":"http://hl7.org/v3","name":"RIM Mapping"},{"identity":"w3c.prov","uri":"http://www.w3.org/ns/prov","name":"W3C PROV"},{"identity":"w5","uri":"http://hl7.org/fhir/fivews","name":"FiveWs Pattern Mapping"},{"identity":"fhirauditevent","uri":"http://hl7.org/fhir/auditevent","name":"FHIR AuditEvent Mapping"}],"kind":"resource","abstract":false,"type":"Provenance","baseDefinition":"http://fhir.de/ConsentManagement/StructureDefinition/Provenance","derivation":"constraint","snapshot":{"element":[{"id":"Provenance","path":"Provenance","short":"Who, What, When for a set of resources","definition":"Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.","comment":"Some parties may be duplicated between the target resource and its provenance. For instance, the prescriber is usually (but not always) the author of the prescription resource. This resource is defined with close consideration for W3C Provenance.","alias":["History","Event","Activity"],"min":0,"max":"*","base":{"path":"Provenance","min":0,"max":"*"},"constraint":[{"key":"dom-2","severity":"error","human":"If the resource is contained in another resource, it SHALL NOT contain nested Resources","expression":"contained.contained.empty()","xpath":"not(parent::f:contained and f:contained)","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"dom-4","severity":"error","human":"If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated","expression":"contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()","xpath":"not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"dom-3","severity":"error","human":"If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource","expression":"contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()","xpath":"not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice","valueBoolean":true},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation","valueMarkdown":"When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."}],"key":"dom-6","severity":"warning","human":"A resource should have narrative for robust management","expression":"text.`div`.exists()","xpath":"exists(f:text/h:div)","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"},{"key":"dom-5","severity":"error","human":"If a resource is contained in another resource, it SHALL NOT have a security label","expression":"contained.meta.security.empty()","xpath":"not(exists(f:contained/*/f:meta/f:security))","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"Entity. Role, or Act"},{"identity":"workflow","map":"Event"},{"identity":"rim","map":"ControlAct[isNormalAct() and subsumes(CACT, classCode) and moodCode=EVN]"},{"identity":"w3c.prov","map":"Activity"}]},{"id":"Provenance.id","path":"Provenance.id","short":"Logical id of this artifact","definition":"The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.","comment":"The only time that a resource does not have an id is when it is being submitted to the server using a create operation.","min":0,"max":"1","base":{"path":"Resource.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"isSummary":true},{"id":"Provenance.meta","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.meta","short":"Metadata about the resource","definition":"The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.","min":0,"max":"1","base":{"path":"Resource.meta","min":0,"max":"1"},"type":[{"code":"Meta"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.implicitRules","path":"Provenance.implicitRules","short":"A set of rules under which this content was created","definition":"A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.","comment":"Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.","min":0,"max":"1","base":{"path":"Resource.implicitRules","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isModifier":true,"isModifierReason":"This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.language","path":"Provenance.language","short":"Language of the resource content","definition":"The base language in which the resource is written.","comment":"Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).","min":0,"max":"1","base":{"path":"Resource.language","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet","valueCanonical":"http://hl7.org/fhir/ValueSet/all-languages"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"Language"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"preferred","description":"A human language.","valueSet":"http://hl7.org/fhir/ValueSet/languages"},"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.text","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.text","short":"Text summary of the resource, for human interpretation","definition":"A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.","comment":"Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.","alias":["narrative","html","xhtml","display"],"min":0,"max":"1","base":{"path":"DomainResource.text","min":0,"max":"1"},"type":[{"code":"Narrative"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"},{"identity":"rim","map":"Act.text?"}]},{"id":"Provenance.contained","path":"Provenance.contained","short":"Contained, inline Resources","definition":"These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.","comment":"This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.","alias":["inline resources","anonymous resources","contained resources"],"min":0,"max":"*","base":{"path":"DomainResource.contained","min":0,"max":"*"},"type":[{"code":"Resource"}],"mapping":[{"identity":"rim","map":"Entity. Role, or Act"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"DomainResource.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.modifierExtension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Extensions that cannot be ignored","definition":"May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"DomainResource.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them","mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.target","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.target","short":"Target Reference(s) (usually version specific)","definition":"The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.","comment":"Target references are usually version specific, but might not be, if a version has not been assigned or if the provenance information is part of the set of resources being maintained (i.e. a document). When using the RESTful API, the identity of the resource might not be known (especially not the version specific one); the client may either submit the resource first, and then the provenance, or it may submit both using a single transaction. See the notes on transaction for further discussion.","min":1,"max":"*","base":{"path":"Provenance.target","min":1,"max":"*"},"type":[{"code":"Reference","targetProfile":["http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireResponse","http://fhir.de/ConsentManagement/StructureDefinition/Consent"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"w5","map":"FiveWs.what[x]"},{"identity":"rim","map":"./outboundRelationship[isNormalActRelationship() and typeCode=SUBJ]/target OR ./participation[isNormalParticipation() and typeCode=SBJ]/role OR ./participation[isNormalParticipation() and typeCode=SBJ]/role[isNormalRole()]/player"},{"identity":"fhirauditevent","map":"AuditEvent.entity.reference"},{"identity":"w3c.prov","map":"Entity Created/Updated"}]},{"id":"Provenance.target.id","path":"Provenance.target.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.target.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.target.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.target.reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.target.reference","short":"Literal reference, Relative, internal or absolute URL","definition":"A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.","comment":"Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.","min":1,"max":"1","base":{"path":"Reference.reference","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1","ref-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.target.type","path":"Provenance.target.type","short":"Type the reference refers to (e.g. \"Patient\")","definition":"The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).","comment":"This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.","min":0,"max":"1","base":{"path":"Reference.type","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"FHIRResourceTypeExt"}],"strength":"extensible","description":"Aa resource (or, for logical models, the URI of the logical model).","valueSet":"http://hl7.org/fhir/ValueSet/resource-types"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.target.identifier","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.target.identifier","short":"Logical reference, when literal reference is not known","definition":"An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.","comment":"When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).","min":0,"max":"1","base":{"path":"Reference.identifier","min":0,"max":"1"},"type":[{"code":"Identifier"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX / EI (occasionally, more often EI maps to a resource id or a URL)"},{"identity":"rim","map":"II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]"},{"identity":"servd","map":"Identifier"},{"identity":"rim","map":".identifier"}]},{"id":"Provenance.target.display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Provenance.target.display","short":"Text alternative for the resource","definition":"Plain text narrative that identifies the resource in addition to the resource reference.","comment":"This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.","min":0,"max":"1","base":{"path":"Reference.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.occurred[x]","path":"Provenance.occurred[x]","short":"When the activity occurred","definition":"The period during which the activity occurred.","comment":"The period can be a little arbitrary; where possible, the time should correspond to human assessment of the activity time.","min":0,"max":"1","base":{"path":"Provenance.occurred[x]","min":0,"max":"1"},"type":[{"code":"Period"},{"code":"dateTime"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"workflow","map":"Event.occurred[x]"},{"identity":"w5","map":"FiveWs.done[x]"},{"identity":"rim","map":"./effectiveTime[type=IVL_TS]"},{"identity":"w3c.prov","map":"Activity.startTime & Activity.endTime"}]},{"id":"Provenance.recorded","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.recorded","short":"When the activity was recorded / updated","definition":"The instant of time at which the activity was recorded.","comment":"This can be a little different from the time stamp on the resource if there is a delay between recording the event and updating the provenance and target resource.","min":1,"max":"1","base":{"path":"Provenance.recorded","min":1,"max":"1"},"type":[{"code":"instant"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"w5","map":"FiveWs.recorded"},{"identity":"rim","map":"unique(./participation[isNormalParticipation() and typeCode=AUT]/time[type=TS])"},{"identity":"fhirauditevent","map":"AuditEvent.recorded"},{"identity":"w3c.prov","map":"Activity.when"}]},{"id":"Provenance.policy","path":"Provenance.policy","short":"Policy or plan the activity was defined by","definition":"Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.","comment":"For example: Where an OAuth token authorizes, the unique identifier from the OAuth token is placed into the policy element Where a policy engine (e.g. XACML) holds policy logic, the unique policy identifier is placed into the policy element.","min":0,"max":"*","base":{"path":"Provenance.policy","min":0,"max":"*"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"./inboundRelationship[isNormalActRelationship() and typeCode=\"SUBJ\"]/source[isNormalAct and subsumes(POLICY, classCode) and moodCode=EVN]/text[typeCode='ED'/tel"},{"identity":"fhirauditevent","map":"AuditEvent.agent.policy"}]},{"id":"Provenance.location","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.location","short":"Where the activity occurred, if relevant","definition":"Where the activity occurred, if relevant.","comment":"References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.","min":0,"max":"1","base":{"path":"Provenance.location","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Location"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.location"},{"identity":"w5","map":"FiveWs.where[x]"},{"identity":"rim","map":"unique(./participation[isNormalParticipation() and typeCode=LOC]/role[isNormalRole() and subsumes(SDLOC, classCode)]/player[isNormalEntity and classCode=\"LOC\" and determinerCode=\"INST\"]"},{"identity":"fhirauditevent","map":"AuditEvent.agent.location"},{"identity":"w3c.prov","map":"Activity.location"}]},{"id":"Provenance.reason","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.reason","short":"Reason the activity is occurring","definition":"The reason that the activity was taking place.","comment":"Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.","min":0,"max":"*","base":{"path":"Provenance.reason","min":0,"max":"*"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ProvenanceReason"}],"strength":"extensible","description":"The reason the activity took place.","valueSet":"http://terminology.hl7.org/ValueSet/v3-PurposeOfUse"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"workflow","map":"Event.reasonCode"},{"identity":"w5","map":"FiveWs.why[x]"},{"identity":"rim","map":"unique(./reasonCode)"},{"identity":"fhirauditevent","map":"AuditEvent.purposeOfEvent"},{"identity":"w3c.prov","map":"Activity.Activity"}]},{"id":"Provenance.activity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.activity","short":"Activity that occurred","definition":"An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.","comment":"Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.","min":0,"max":"1","base":{"path":"Provenance.activity","min":0,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ProvenanceActivity"}],"strength":"extensible","description":"The activity that took place.","valueSet":"http://hl7.org/fhir/ValueSet/provenance-activity-type"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"workflow","map":"Event.code"},{"identity":"w5","map":"FiveWs.why[x]"},{"identity":"rim","map":"Act.code"},{"identity":"w3c.prov","map":"Activity.Activity"}]},{"id":"Provenance.agent","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.agent","short":"Actor involved","definition":"An dieser Stelle soll die verwendete Software dokumentiert werden. Über die Form der Dokumentation wird hier keine Aussage getroffen, d.h. auch eine freitextliche Angabe (agent.who.display) ist möglich.\r\n\r\nOptional können die an der Erstellung der Einwilligung beteiligten Personen und/oder Organisationen hier referenziert werden, sofern im konkreten Anwendungsfall die Referenzierung mittels signature.who nicht ausreicht.","comment":"Several agents may be associated (i.e. has some responsibility for an activity) with an activity and vice-versa.","requirements":"An agent can be a person, an organization, software, device, or other entities that may be ascribed responsibility.","min":1,"max":"*","base":{"path":"Provenance.agent","min":1,"max":"*"},"type":[{"code":"BackboneElement"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"workflow","map":"Event.performer"},{"identity":"w5","map":"FiveWs.who"},{"identity":"rim","map":"./participation[isNormalParticipation()] OR ./outboundRelationship[isNormalActRelationship() and typeCode='DRIV']"},{"identity":"fhirauditevent","map":"AuditEvent.agent"},{"identity":"w3c.prov","map":"Agent"}]},{"id":"Provenance.agent.id","path":"Provenance.agent.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.agent.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.agent.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.agent.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.agent.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.agent.type","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.agent.type","short":"How the agent participated","definition":"The participation the agent had with respect to the activity.","comment":"For example: author, performer, enterer, attester, etc.","min":0,"max":"1","base":{"path":"Provenance.agent.type","min":0,"max":"1"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ProvenanceAgentType"}],"strength":"extensible","description":"The type of participation that a provenance agent played with respect to the activity.","valueSet":"http://hl7.org/fhir/ValueSet/provenance-agent-type"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"workflow","map":"Event.performer.function"},{"identity":"rim","map":".role"},{"identity":"fhirauditevent","map":"AuditEvent.agent.type"},{"identity":"w3c.prov","map":"Agent.Attribution"}]},{"id":"Provenance.agent.role","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.agent.role","short":"What the agents role was","definition":"The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.","comment":"For example: doctor, nurse, clerk, etc.","min":0,"max":"*","base":{"path":"Provenance.agent.role","min":0,"max":"*"},"type":[{"code":"CodeableConcept"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ProvenanceAgentRole"}],"strength":"example","description":"The role that a provenance agent played with respect to the activity.","valueSet":"http://hl7.org/fhir/ValueSet/security-role-type"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE"},{"identity":"rim","map":"CD"},{"identity":"orim","map":"fhir:CodeableConcept rdfs:subClassOf dt:CD"},{"identity":"rim","map":".typecode"},{"identity":"fhirauditevent","map":"AuditEvent.agent.role"}]},{"id":"Provenance.agent.who","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.agent.who","short":"Who participated","definition":"The individual, device or organization that participated in the event.","comment":"whoIdentity should be used when the agent is not a Resource type.","min":1,"max":"1","base":{"path":"Provenance.agent.who","min":1,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Organization"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"workflow","map":"Event.performer.actor"},{"identity":"w5","map":"FiveWs.actor"},{"identity":"rim","map":".id"}]},{"id":"Provenance.agent.onBehalfOf","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.agent.onBehalfOf","short":"Who the agent is representing","definition":"The individual, device, or organization for whom the change was made.","comment":"onBehalfOfIdentity should be used when the agent is not a Resource type.","min":0,"max":"1","base":{"path":"Provenance.agent.onBehalfOf","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Organization"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"rim","map":"Person, Practitioner, Organization, Device :* .role [classCode = RoleClassMutualRelationship; role.code and * .scopes[Role](classCode=IDENT) and *.plays [Role.Code]"}]},{"id":"Provenance.entity","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.entity","short":"An entity used in this activity","definition":"An entity used in this activity.","min":0,"max":"*","base":{"path":"Provenance.entity","min":0,"max":"*"},"type":[{"code":"BackboneElement"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"./subjectOf"},{"identity":"fhirauditevent","map":"AuditEvent.entity"},{"identity":"w3c.prov","map":"Entity"}]},{"id":"Provenance.entity.id","path":"Provenance.entity.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.entity.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.entity.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.entity.modifierExtension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.entity.modifierExtension","short":"Extensions that cannot be ignored even if unrecognized","definition":"May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","requirements":"Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).","alias":["extensions","user content","modifiers"],"min":0,"max":"*","base":{"path":"BackboneElement.modifierExtension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"isModifier":true,"isModifierReason":"Modifier extensions are expected to modify the meaning or interpretation of the element that contains them","isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.entity.role","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.entity.role","short":"derivation | revision | quotation | source | removal","definition":"How the entity was used during the activity.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","min":1,"max":"1","base":{"path":"Provenance.entity.role","min":1,"max":"1"},"type":[{"code":"code"}],"fixedCode":"source","condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"ProvenanceEntityRole"}],"strength":"required","description":"How an entity was used in an activity.","valueSet":"http://hl7.org/fhir/ValueSet/provenance-entity-role|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"./typeCode"},{"identity":"fhirauditevent","map":"AuditEvent.entity.lifecycle"},{"identity":"w3c.prov","map":"Entity.role"}]},{"id":"Provenance.entity.what","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.entity.what","short":"Identity of entity","definition":"Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.","comment":"whatIdentity should be used for entities that are not a Resource type.","min":1,"max":"1","base":{"path":"Provenance.entity.what","min":1,"max":"1"},"type":[{"code":"Reference","targetProfile":["https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-documentreference"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"},{"identity":"rim","map":"./text/reference"},{"identity":"fhirauditevent","map":"AuditEvent.entity.reference"},{"identity":"w3c.prov","map":"Entity.Identity"}]},{"id":"Provenance.entity.what.id","path":"Provenance.entity.what.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.entity.what.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.entity.what.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.entity.what.reference","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.entity.what.reference","short":"Literal reference, Relative, internal or absolute URL","definition":"A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.","comment":"Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.","min":1,"max":"1","base":{"path":"Reference.reference","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1","ref-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.entity.what.type","path":"Provenance.entity.what.type","short":"Type the reference refers to (e.g. \"Patient\")","definition":"The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).","comment":"This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.","min":0,"max":"1","base":{"path":"Reference.type","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"FHIRResourceTypeExt"}],"strength":"extensible","description":"Aa resource (or, for logical models, the URI of the logical model).","valueSet":"http://hl7.org/fhir/ValueSet/resource-types"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.entity.what.identifier","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.entity.what.identifier","short":"Logical reference, when literal reference is not known","definition":"An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.","comment":"When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).","min":0,"max":"1","base":{"path":"Reference.identifier","min":0,"max":"1"},"type":[{"code":"Identifier"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CX / EI (occasionally, more often EI maps to a resource id or a URL)"},{"identity":"rim","map":"II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]"},{"identity":"servd","map":"Identifier"},{"identity":"rim","map":".identifier"}]},{"id":"Provenance.entity.what.display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Provenance.entity.what.display","short":"Text alternative for the resource","definition":"Plain text narrative that identifies the resource in addition to the resource reference.","comment":"This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.","min":0,"max":"1","base":{"path":"Reference.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.entity.agent","path":"Provenance.entity.agent","short":"Entity is attributed to this agent","definition":"The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.","comment":"A usecase where one Provenance.entity.agent is used where the Entity that was used in the creation/updating of the Target, is not in the context of the same custodianship as the Target, and thus the meaning of Provenance.entity.agent is to say that the entity referenced is managed elsewhere and that this Agent provided access to it. This would be similar to where the Entity being referenced is managed outside FHIR, such as through HL7 v2, v3, or XDS. This might be where the Entity being referenced is managed in another FHIR resource server. Thus it explains the Provenance of that Entity's use in the context of this Provenance activity.","min":0,"max":"*","base":{"path":"Provenance.entity.agent","min":0,"max":"*"},"contentReference":"http://hl7.org/fhir/StructureDefinition/Provenance#Provenance.agent","mapping":[{"identity":"rim","map":"./author/role"}]},{"id":"Provenance.signature","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"trial-use"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature","short":"Signature on target","definition":"A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.","comment":"The elements of the Signature Resource are for ease of access of these elements. For digital signatures (Xml DigSig, JWS), the non-repudiation proof comes from the Signature validation, which includes validation of the referenced objects (e.g. Resources) (a.k.a., Content) in the XML-Signature Detached form.","min":0,"max":"*","base":{"path":"Provenance.signature","min":0,"max":"*"},"type":[{"code":"Signature"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"},{"identity":"rim","map":"./signatureText"}]},{"id":"Provenance.signature.id","path":"Provenance.signature.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.signature.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.signature.type","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature.type","short":"Indication of the reason the entity signed the object(s)","definition":"An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.","comment":"Examples include attesting to: authorship, correct transcription, and witness of specific event. Also known as a "Commitment Type Indication".","min":1,"max":"*","base":{"path":"Signature.type","min":1,"max":"*"},"type":[{"code":"Coding"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"SignatureType"}],"strength":"required","description":"An indication of the reason that an entity signed the object.","valueSet":"https://www.medizininformatik-initiative.de/fhir/modul-consent/ValueSet/mii-vs-consent-signaturetypes"},"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"CE/CNE/CWE subset one of the sets of component 1-3 or 4-6"},{"identity":"rim","map":"CV"},{"identity":"orim","map":"fhir:Coding rdfs:subClassOf dt:CDCoding"}]},{"id":"Provenance.signature.type.id","path":"Provenance.signature.type.id","representation":["xmlAttr"],"short":"Unique id for inter-element referencing","definition":"Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.","min":0,"max":"1","base":{"path":"Element.id","min":0,"max":"1"},"type":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type","valueUrl":"string"}],"code":"http://hl7.org/fhirpath/System.String"}],"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.signature.type.extension","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature.type.extension","slicing":{"discriminator":[{"type":"value","path":"url"}],"description":"Extensions are always sliced by (at least) url","rules":"open"},"short":"Additional content defined by implementations","definition":"May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.","comment":"There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.","alias":["extensions","user content"],"min":0,"max":"*","base":{"path":"Element.extension","min":0,"max":"*"},"type":[{"code":"Extension"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ext-1","severity":"error","human":"Must have either extensions or value[x], not both","expression":"extension.exists() != value.exists()","xpath":"exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])","source":"http://hl7.org/fhir/StructureDefinition/DomainResource"}],"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"N/A"}]},{"id":"Provenance.signature.type.system","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature.type.system","short":"Identity of the terminology system","definition":"The identification of the code system that defines the meaning of the symbol in the code.","comment":"The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.","requirements":"Need to be unambiguous about the source of the definition of the symbol.","min":1,"max":"1","base":{"path":"Coding.system","min":0,"max":"1"},"type":[{"code":"uri"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.3"},{"identity":"rim","map":"./codeSystem"},{"identity":"orim","map":"fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem"}]},{"id":"Provenance.signature.type.version","path":"Provenance.signature.type.version","short":"Version of the system - if relevant","definition":"The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.","comment":"Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.","min":0,"max":"1","base":{"path":"Coding.version","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.7"},{"identity":"rim","map":"./codeSystemVersion"},{"identity":"orim","map":"fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion"}]},{"id":"Provenance.signature.type.code","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature.type.code","short":"Symbol in syntax defined by the system","definition":"A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to refer to a particular code in the system.","min":1,"max":"1","base":{"path":"Coding.code","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.1"},{"identity":"rim","map":"./code"},{"identity":"orim","map":"fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code"}]},{"id":"Provenance.signature.type.display","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable","valueBoolean":true}],"path":"Provenance.signature.type.display","short":"Representation defined by the system","definition":"A representation of the meaning of the code in the system, following the rules of the system.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","requirements":"Need to be able to carry a human-readable meaning of the code for readers that do not know the system.","min":0,"max":"1","base":{"path":"Coding.display","min":0,"max":"1"},"type":[{"code":"string"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"C*E.2 - but note this is not well followed"},{"identity":"rim","map":"CV.displayName"},{"identity":"orim","map":"fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName"}]},{"id":"Provenance.signature.type.userSelected","path":"Provenance.signature.type.userSelected","short":"If this coding was chosen directly by the user","definition":"Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).","comment":"Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.","requirements":"This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.","min":0,"max":"1","base":{"path":"Coding.userSelected","min":0,"max":"1"},"type":[{"code":"boolean"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"v2","map":"Sometimes implied by being first"},{"identity":"rim","map":"CD.codingRationale"},{"identity":"orim","map":"fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]"}]},{"id":"Provenance.signature.when","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature.when","short":"When the signature was created","definition":"When the digital signature was signed.","comment":"This should agree with the information in the signature.","min":1,"max":"1","base":{"path":"Signature.when","min":1,"max":"1"},"type":[{"code":"instant"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.signature.who","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature.who","short":"Who signed","definition":"A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).","comment":"This should agree with the information in the signature.","min":1,"max":"1","base":{"path":"Signature.who","min":1,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Organization"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"}]},{"id":"Provenance.signature.onBehalfOf","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature.onBehalfOf","short":"The party represented","definition":"A reference to an application-usable description of the identity that is represented by the signature.","comment":"The party that can't sign. For example a child.","requirements":"used when the signature is on behalf of a non-signer.","min":0,"max":"1","base":{"path":"Signature.onBehalfOf","min":0,"max":"1"},"type":[{"code":"Reference","targetProfile":["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Organization"]}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"},{"key":"ref-1","severity":"error","human":"SHALL have a contained resource if a local reference is provided","expression":"reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))","xpath":"not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])","source":"http://hl7.org/fhir/StructureDefinition/Provenance"}],"mustSupport":true,"isSummary":true,"mapping":[{"identity":"rim","map":"n/a"},{"identity":"rim","map":"The target of a resource reference is a RIM entry point (Act, Role, or Entity)"}]},{"id":"Provenance.signature.targetFormat","path":"Provenance.signature.targetFormat","short":"The technical format of the signed resources","definition":"A mime type that indicates the technical format of the target resources signed by the signature.","comment":"\"xml\", \"json\" and \"ttl\" are allowed, which describe the simple encodings described in the specification (and imply appropriate bundle support). Otherwise, mime types are legal here.","min":0,"max":"1","base":{"path":"Signature.targetFormat","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"MimeType"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"required","description":"The mime type of an attachment. Any valid mime type is allowed.","valueSet":"http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.signature.sigFormat","path":"Provenance.signature.sigFormat","short":"The technical format of the signature","definition":"A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.","comment":"Note that FHIR strings SHALL NOT exceed 1MB in size","min":0,"max":"1","base":{"path":"Signature.sigFormat","min":0,"max":"1"},"type":[{"code":"code"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"binding":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName","valueString":"MimeType"},{"url":"http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding","valueBoolean":true}],"strength":"required","description":"The mime type of an attachment. Any valid mime type is allowed.","valueSet":"http://hl7.org/fhir/ValueSet/mimetypes|4.0.1"},"mapping":[{"identity":"rim","map":"n/a"}]},{"id":"Provenance.signature.data","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status","valueCode":"normative"},{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version","valueCode":"4.0.0"}],"path":"Provenance.signature.data","short":"The actual signature content (XML DigSig. JWS, picture, etc.)","definition":"The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.","comment":"Where the signature type is an XML DigSig, the signed content is a FHIR Resource(s), the signature is of the XML form of the Resource(s) using XML-Signature (XMLDIG) \"Detached Signature\" form.","min":0,"max":"1","base":{"path":"Signature.data","min":0,"max":"1"},"type":[{"code":"base64Binary"}],"condition":["ele-1"],"constraint":[{"key":"ele-1","severity":"error","human":"All FHIR elements must have a @value or children","expression":"hasValue() or (children().count() > id.count())","xpath":"@value|f:*|h:div","source":"http://hl7.org/fhir/StructureDefinition/Element"}],"mustSupport":true,"mapping":[{"identity":"rim","map":"n/a"}]}]},"differential":{"element":[{"id":"Provenance.entity.what","path":"Provenance.entity.what","type":[{"code":"Reference","targetProfile":["https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-documentreference"]}]},{"id":"Provenance.signature.type","path":"Provenance.signature.type","binding":{"strength":"required","valueSet":"https://www.medizininformatik-initiative.de/fhir/modul-consent/ValueSet/mii-vs-consent-signaturetypes"}}]}} \ No newline at end of file +{ + "resourceType": "StructureDefinition", + "id": "f675b1e8-9f3f-44e8-bb59-9681f78eb464", + "url": "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-provenance", + "version": "1.0.7", + "name": "MII_PR_Consent_Provenance", + "title": "Profile - MI-I - Consent - Provenance", + "status": "active", + "date": "2023-05-09", + "description": "Dieses Profil beschreibt Herkunftsinformationen zu Einwilligungen in der Medizininformatik-Initiative.", + "fhirVersion": "4.0.1", + "mapping": [ + { + "identity": "workflow", + "uri": "http://hl7.org/fhir/workflow", + "name": "Workflow Pattern" + }, + { + "identity": "rim", + "uri": "http://hl7.org/v3", + "name": "RIM Mapping" + }, + { + "identity": "w3c.prov", + "uri": "http://www.w3.org/ns/prov", + "name": "W3C PROV" + }, + { + "identity": "w5", + "uri": "http://hl7.org/fhir/fivews", + "name": "FiveWs Pattern Mapping" + }, + { + "identity": "fhirauditevent", + "uri": "http://hl7.org/fhir/auditevent", + "name": "FHIR AuditEvent Mapping" + } + ], + "kind": "resource", + "abstract": false, + "type": "Provenance", + "baseDefinition": "http://fhir.de/ConsentManagement/StructureDefinition/Provenance", + "derivation": "constraint", + "snapshot": { + "element": [ + { + "id": "Provenance", + "path": "Provenance", + "short": "Who, What, When for a set of resources", + "definition": "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.", + "comment": "Some parties may be duplicated between the target resource and its provenance. For instance, the prescriber is usually (but not always) the author of the prescription resource. This resource is defined with close consideration for W3C Provenance.", + "alias": [ + "History", + "Event", + "Activity" + ], + "min": 0, + "max": "*", + "base": { + "path": "Provenance", + "min": 0, + "max": "*" + }, + "constraint": [ + { + "key": "dom-2", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources", + "expression": "contained.contained.empty()", + "xpath": "not(parent::f:contained and f:contained)", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-4", + "severity": "error", + "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated", + "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()", + "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-3", + "severity": "error", + "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource", + "expression": "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()", + "xpath": "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice", + "valueBoolean": true + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation", + "valueMarkdown": "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time." + } + ], + "key": "dom-6", + "severity": "warning", + "human": "A resource should have narrative for robust management", + "expression": "text.`div`.exists()", + "xpath": "exists(f:text/h:div)", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + }, + { + "key": "dom-5", + "severity": "error", + "human": "If a resource is contained in another resource, it SHALL NOT have a security label", + "expression": "contained.meta.security.empty()", + "xpath": "not(exists(f:contained/*/f:meta/f:security))", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "Entity. Role, or Act" + }, + { + "identity": "workflow", + "map": "Event" + }, + { + "identity": "rim", + "map": "ControlAct[isNormalAct() and subsumes(CACT, classCode) and moodCode=EVN]" + }, + { + "identity": "w3c.prov", + "map": "Activity" + } + ] + }, + { + "id": "Provenance.id", + "path": "Provenance.id", + "short": "Logical id of this artifact", + "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.", + "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "isSummary": true + }, + { + "id": "Provenance.meta", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.meta", + "short": "Metadata about the resource", + "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.meta", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Meta" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.implicitRules", + "path": "Provenance.implicitRules", + "short": "A set of rules under which this content was created", + "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.", + "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.", + "min": 0, + "max": "1", + "base": { + "path": "Resource.implicitRules", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isModifier": true, + "isModifierReason": "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.language", + "path": "Provenance.language", + "short": "Language of the resource content", + "definition": "The base language in which the resource is written.", + "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).", + "min": 0, + "max": "1", + "base": { + "path": "Resource.language", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet", + "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "Language" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "preferred", + "description": "A human language.", + "valueSet": "http://hl7.org/fhir/ValueSet/languages" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.text", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.text", + "short": "Text summary of the resource, for human interpretation", + "definition": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.", + "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.", + "alias": [ + "narrative", + "html", + "xhtml", + "display" + ], + "min": 0, + "max": "1", + "base": { + "path": "DomainResource.text", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Narrative" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + }, + { + "identity": "rim", + "map": "Act.text?" + } + ] + }, + { + "id": "Provenance.contained", + "path": "Provenance.contained", + "short": "Contained, inline Resources", + "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.", + "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.", + "alias": [ + "inline resources", + "anonymous resources", + "contained resources" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.contained", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Resource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "Entity. Role, or Act" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.modifierExtension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Extensions that cannot be ignored", + "definition": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "DomainResource.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them", + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.target", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.target", + "short": "Target Reference(s) (usually version specific)", + "definition": "The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity.", + "comment": "Target references are usually version specific, but might not be, if a version has not been assigned or if the provenance information is part of the set of resources being maintained (i.e. a document). When using the RESTful API, the identity of the resource might not be known (especially not the version specific one); the client may either submit the resource first, and then the provenance, or it may submit both using a single transaction. See the notes on transaction for further discussion.", + "min": 1, + "max": "*", + "base": { + "path": "Provenance.target", + "min": 1, + "max": "*" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://fhir.de/ConsentManagement/StructureDefinition/QuestionnaireResponse", + "http://fhir.de/ConsentManagement/StructureDefinition/Consent" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "w5", + "map": "FiveWs.what[x]" + }, + { + "identity": "rim", + "map": "./outboundRelationship[isNormalActRelationship() and typeCode=SUBJ]/target OR ./participation[isNormalParticipation() and typeCode=SBJ]/role OR ./participation[isNormalParticipation() and typeCode=SBJ]/role[isNormalRole()]/player" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.entity.reference" + }, + { + "identity": "w3c.prov", + "map": "Entity Created/Updated" + } + ] + }, + { + "id": "Provenance.target.id", + "path": "Provenance.target.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.target.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.target.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.target.reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.target.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 1, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.target.type", + "path": "Provenance.target.type", + "short": "Type the reference refers to (e.g. \"Patient\")", + "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + "comment": "This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "FHIRResourceTypeExt" + } + ], + "strength": "extensible", + "description": "Aa resource (or, for logical models, the URI of the logical model).", + "valueSet": "http://hl7.org/fhir/ValueSet/resource-types" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.target.identifier", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.target.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Provenance.target.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Provenance.target.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.occurred[x]", + "path": "Provenance.occurred[x]", + "short": "When the activity occurred", + "definition": "The period during which the activity occurred.", + "comment": "The period can be a little arbitrary; where possible, the time should correspond to human assessment of the activity time.", + "min": 0, + "max": "1", + "base": { + "path": "Provenance.occurred[x]", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Period" + }, + { + "code": "dateTime" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "workflow", + "map": "Event.occurred[x]" + }, + { + "identity": "w5", + "map": "FiveWs.done[x]" + }, + { + "identity": "rim", + "map": "./effectiveTime[type=IVL_TS]" + }, + { + "identity": "w3c.prov", + "map": "Activity.startTime & Activity.endTime" + } + ] + }, + { + "id": "Provenance.recorded", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.recorded", + "short": "When the activity was recorded / updated", + "definition": "The instant of time at which the activity was recorded.", + "comment": "This can be a little different from the time stamp on the resource if there is a delay between recording the event and updating the provenance and target resource.", + "min": 1, + "max": "1", + "base": { + "path": "Provenance.recorded", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "instant" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "w5", + "map": "FiveWs.recorded" + }, + { + "identity": "rim", + "map": "unique(./participation[isNormalParticipation() and typeCode=AUT]/time[type=TS])" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.recorded" + }, + { + "identity": "w3c.prov", + "map": "Activity.when" + } + ] + }, + { + "id": "Provenance.policy", + "path": "Provenance.policy", + "short": "Policy or plan the activity was defined by", + "definition": "Policy or plan the activity was defined by. Typically, a single activity may have multiple applicable policy documents, such as patient consent, guarantor funding, etc.", + "comment": "For example: Where an OAuth token authorizes, the unique identifier from the OAuth token is placed into the policy element Where a policy engine (e.g. XACML) holds policy logic, the unique policy identifier is placed into the policy element.", + "min": 0, + "max": "*", + "base": { + "path": "Provenance.policy", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "./inboundRelationship[isNormalActRelationship() and typeCode=\"SUBJ\"]/source[isNormalAct and subsumes(POLICY, classCode) and moodCode=EVN]/text[typeCode='ED'/tel" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.agent.policy" + } + ] + }, + { + "id": "Provenance.location", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.location", + "short": "Where the activity occurred, if relevant", + "definition": "Where the activity occurred, if relevant.", + "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.", + "min": 0, + "max": "1", + "base": { + "path": "Provenance.location", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Location" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.location" + }, + { + "identity": "w5", + "map": "FiveWs.where[x]" + }, + { + "identity": "rim", + "map": "unique(./participation[isNormalParticipation() and typeCode=LOC]/role[isNormalRole() and subsumes(SDLOC, classCode)]/player[isNormalEntity and classCode=\"LOC\" and determinerCode=\"INST\"]" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.agent.location" + }, + { + "identity": "w3c.prov", + "map": "Activity.location" + } + ] + }, + { + "id": "Provenance.reason", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.reason", + "short": "Reason the activity is occurring", + "definition": "The reason that the activity was taking place.", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "min": 0, + "max": "*", + "base": { + "path": "Provenance.reason", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ProvenanceReason" + } + ], + "strength": "extensible", + "description": "The reason the activity took place.", + "valueSet": "http://terminology.hl7.org/ValueSet/v3-PurposeOfUse" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "workflow", + "map": "Event.reasonCode" + }, + { + "identity": "w5", + "map": "FiveWs.why[x]" + }, + { + "identity": "rim", + "map": "unique(./reasonCode)" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.purposeOfEvent" + }, + { + "identity": "w3c.prov", + "map": "Activity.Activity" + } + ] + }, + { + "id": "Provenance.activity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.activity", + "short": "Activity that occurred", + "definition": "An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.", + "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.", + "min": 0, + "max": "1", + "base": { + "path": "Provenance.activity", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ProvenanceActivity" + } + ], + "strength": "extensible", + "description": "The activity that took place.", + "valueSet": "http://hl7.org/fhir/ValueSet/provenance-activity-type" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "workflow", + "map": "Event.code" + }, + { + "identity": "w5", + "map": "FiveWs.why[x]" + }, + { + "identity": "rim", + "map": "Act.code" + }, + { + "identity": "w3c.prov", + "map": "Activity.Activity" + } + ] + }, + { + "id": "Provenance.agent", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.agent", + "short": "Actor involved", + "definition": "An dieser Stelle soll die verwendete Software dokumentiert werden. Über die Form der Dokumentation wird hier keine Aussage getroffen, d.h. auch eine freitextliche Angabe (agent.who.display) ist möglich.\r\n\r\nOptional können die an der Erstellung der Einwilligung beteiligten Personen und/oder Organisationen hier referenziert werden, sofern im konkreten Anwendungsfall die Referenzierung mittels signature.who nicht ausreicht.", + "comment": "Several agents may be associated (i.e. has some responsibility for an activity) with an activity and vice-versa.", + "requirements": "An agent can be a person, an organization, software, device, or other entities that may be ascribed responsibility.", + "min": 1, + "max": "*", + "base": { + "path": "Provenance.agent", + "min": 1, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "workflow", + "map": "Event.performer" + }, + { + "identity": "w5", + "map": "FiveWs.who" + }, + { + "identity": "rim", + "map": "./participation[isNormalParticipation()] OR ./outboundRelationship[isNormalActRelationship() and typeCode='DRIV']" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.agent" + }, + { + "identity": "w3c.prov", + "map": "Agent" + } + ] + }, + { + "id": "Provenance.agent.id", + "path": "Provenance.agent.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.agent.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.agent.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.agent.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.agent.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.agent.type", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.agent.type", + "short": "How the agent participated", + "definition": "The participation the agent had with respect to the activity.", + "comment": "For example: author, performer, enterer, attester, etc.", + "min": 0, + "max": "1", + "base": { + "path": "Provenance.agent.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ProvenanceAgentType" + } + ], + "strength": "extensible", + "description": "The type of participation that a provenance agent played with respect to the activity.", + "valueSet": "http://hl7.org/fhir/ValueSet/provenance-agent-type" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "workflow", + "map": "Event.performer.function" + }, + { + "identity": "rim", + "map": ".role" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.agent.type" + }, + { + "identity": "w3c.prov", + "map": "Agent.Attribution" + } + ] + }, + { + "id": "Provenance.agent.role", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.agent.role", + "short": "What the agents role was", + "definition": "The function of the agent with respect to the activity. The security role enabling the agent with respect to the activity.", + "comment": "For example: doctor, nurse, clerk, etc.", + "min": 0, + "max": "*", + "base": { + "path": "Provenance.agent.role", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "CodeableConcept" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ProvenanceAgentRole" + } + ], + "strength": "example", + "description": "The role that a provenance agent played with respect to the activity.", + "valueSet": "http://hl7.org/fhir/ValueSet/security-role-type" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE" + }, + { + "identity": "rim", + "map": "CD" + }, + { + "identity": "orim", + "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD" + }, + { + "identity": "rim", + "map": ".typecode" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.agent.role" + } + ] + }, + { + "id": "Provenance.agent.who", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.agent.who", + "short": "Who participated", + "definition": "The individual, device or organization that participated in the event.", + "comment": "whoIdentity should be used when the agent is not a Resource type.", + "min": 1, + "max": "1", + "base": { + "path": "Provenance.agent.who", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson", + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/Device", + "http://hl7.org/fhir/StructureDefinition/Organization" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "workflow", + "map": "Event.performer.actor" + }, + { + "identity": "w5", + "map": "FiveWs.actor" + }, + { + "identity": "rim", + "map": ".id" + } + ] + }, + { + "id": "Provenance.agent.onBehalfOf", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.agent.onBehalfOf", + "short": "Who the agent is representing", + "definition": "The individual, device, or organization for whom the change was made.", + "comment": "onBehalfOfIdentity should be used when the agent is not a Resource type.", + "min": 0, + "max": "1", + "base": { + "path": "Provenance.agent.onBehalfOf", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson", + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/Device", + "http://hl7.org/fhir/StructureDefinition/Organization" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "rim", + "map": "Person, Practitioner, Organization, Device :* .role [classCode = RoleClassMutualRelationship; role.code and * .scopes[Role](classCode=IDENT) and *.plays [Role.Code]" + } + ] + }, + { + "id": "Provenance.entity", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.entity", + "short": "An entity used in this activity", + "definition": "An entity used in this activity.", + "min": 0, + "max": "*", + "base": { + "path": "Provenance.entity", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "BackboneElement" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "./subjectOf" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.entity" + }, + { + "identity": "w3c.prov", + "map": "Entity" + } + ] + }, + { + "id": "Provenance.entity.id", + "path": "Provenance.entity.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.entity.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.entity.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.entity.modifierExtension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.entity.modifierExtension", + "short": "Extensions that cannot be ignored even if unrecognized", + "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored. This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).", + "alias": [ + "extensions", + "user content", + "modifiers" + ], + "min": 0, + "max": "*", + "base": { + "path": "BackboneElement.modifierExtension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "isModifier": true, + "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them", + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.entity.role", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.entity.role", + "short": "derivation | revision | quotation | source | removal", + "definition": "How the entity was used during the activity.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "min": 1, + "max": "1", + "base": { + "path": "Provenance.entity.role", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "fixedCode": "source", + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "ProvenanceEntityRole" + } + ], + "strength": "required", + "description": "How an entity was used in an activity.", + "valueSet": "http://hl7.org/fhir/ValueSet/provenance-entity-role|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "./typeCode" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.entity.lifecycle" + }, + { + "identity": "w3c.prov", + "map": "Entity.role" + } + ] + }, + { + "id": "Provenance.entity.what", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.entity.what", + "short": "Identity of entity", + "definition": "Identity of the Entity used. May be a logical or physical uri and maybe absolute or relative.", + "comment": "whatIdentity should be used for entities that are not a Resource type.", + "min": 1, + "max": "1", + "base": { + "path": "Provenance.entity.what", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-documentreference" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + }, + { + "identity": "rim", + "map": "./text/reference" + }, + { + "identity": "fhirauditevent", + "map": "AuditEvent.entity.reference" + }, + { + "identity": "w3c.prov", + "map": "Entity.Identity" + } + ] + }, + { + "id": "Provenance.entity.what.id", + "path": "Provenance.entity.what.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.entity.what.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.entity.what.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.entity.what.reference", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.entity.what.reference", + "short": "Literal reference, Relative, internal or absolute URL", + "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries. Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.", + "min": 1, + "max": "1", + "base": { + "path": "Reference.reference", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1", + "ref-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.entity.what.type", + "path": "Provenance.entity.what.type", + "short": "Type the reference refers to (e.g. \"Patient\")", + "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + "comment": "This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.type", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "FHIRResourceTypeExt" + } + ], + "strength": "extensible", + "description": "Aa resource (or, for logical models, the URI of the logical model).", + "valueSet": "http://hl7.org/fhir/ValueSet/resource-types" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.entity.what.identifier", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.entity.what.identifier", + "short": "Logical reference, when literal reference is not known", + "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).", + "min": 0, + "max": "1", + "base": { + "path": "Reference.identifier", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Identifier" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)" + }, + { + "identity": "rim", + "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]" + }, + { + "identity": "servd", + "map": "Identifier" + }, + { + "identity": "rim", + "map": ".identifier" + } + ] + }, + { + "id": "Provenance.entity.what.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Provenance.entity.what.display", + "short": "Text alternative for the resource", + "definition": "Plain text narrative that identifies the resource in addition to the resource reference.", + "comment": "This is generally not the same as the Resource.text of the referenced resource. The purpose is to identify what's being referenced, not to fully describe it.", + "min": 0, + "max": "1", + "base": { + "path": "Reference.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.entity.agent", + "path": "Provenance.entity.agent", + "short": "Entity is attributed to this agent", + "definition": "The entity is attributed to an agent to express the agent's responsibility for that entity, possibly along with other agents. This description can be understood as shorthand for saying that the agent was responsible for the activity which generated the entity.", + "comment": "A usecase where one Provenance.entity.agent is used where the Entity that was used in the creation/updating of the Target, is not in the context of the same custodianship as the Target, and thus the meaning of Provenance.entity.agent is to say that the entity referenced is managed elsewhere and that this Agent provided access to it. This would be similar to where the Entity being referenced is managed outside FHIR, such as through HL7 v2, v3, or XDS. This might be where the Entity being referenced is managed in another FHIR resource server. Thus it explains the Provenance of that Entity's use in the context of this Provenance activity.", + "min": 0, + "max": "*", + "base": { + "path": "Provenance.entity.agent", + "min": 0, + "max": "*" + }, + "contentReference": "http://hl7.org/fhir/StructureDefinition/Provenance#Provenance.agent", + "mapping": [ + { + "identity": "rim", + "map": "./author/role" + } + ] + }, + { + "id": "Provenance.signature", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "trial-use" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature", + "short": "Signature on target", + "definition": "A digital signature on the target Reference(s). The signer should match a Provenance.agent. The purpose of the signature is indicated.", + "comment": "The elements of the Signature Resource are for ease of access of these elements. For digital signatures (Xml DigSig, JWS), the non-repudiation proof comes from the Signature validation, which includes validation of the referenced objects (e.g. Resources) (a.k.a., Content) in the XML-Signature Detached form.", + "min": 0, + "max": "*", + "base": { + "path": "Provenance.signature", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Signature" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + }, + { + "identity": "rim", + "map": "./signatureText" + } + ] + }, + { + "id": "Provenance.signature.id", + "path": "Provenance.signature.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.signature.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.signature.type", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature.type", + "short": "Indication of the reason the entity signed the object(s)", + "definition": "An indication of the reason that the entity signed this document. This may be explicitly included as part of the signature information and can be used when determining accountability for various actions concerning the document.", + "comment": "Examples include attesting to: authorship, correct transcription, and witness of specific event. Also known as a "Commitment Type Indication".", + "min": 1, + "max": "*", + "base": { + "path": "Signature.type", + "min": 1, + "max": "*" + }, + "type": [ + { + "code": "Coding" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "SignatureType" + } + ], + "strength": "required", + "description": "An indication of the reason that an entity signed the object.", + "valueSet": "https://www.medizininformatik-initiative.de/fhir/modul-consent/ValueSet/mii-vs-consent-signaturetypes" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" + }, + { + "identity": "rim", + "map": "CV" + }, + { + "identity": "orim", + "map": "fhir:Coding rdfs:subClassOf dt:CDCoding" + } + ] + }, + { + "id": "Provenance.signature.type.id", + "path": "Provenance.signature.type.id", + "representation": [ + "xmlAttr" + ], + "short": "Unique id for inter-element referencing", + "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + "min": 0, + "max": "1", + "base": { + "path": "Element.id", + "min": 0, + "max": "1" + }, + "type": [ + { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type", + "valueUrl": "string" + } + ], + "code": "http://hl7.org/fhirpath/System.String" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.signature.type.extension", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature.type.extension", + "slicing": { + "discriminator": [ + { + "type": "value", + "path": "url" + } + ], + "description": "Extensions are always sliced by (at least) url", + "rules": "open" + }, + "short": "Additional content defined by implementations", + "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.", + "alias": [ + "extensions", + "user content" + ], + "min": 0, + "max": "*", + "base": { + "path": "Element.extension", + "min": 0, + "max": "*" + }, + "type": [ + { + "code": "Extension" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ext-1", + "severity": "error", + "human": "Must have either extensions or value[x], not both", + "expression": "extension.exists() != value.exists()", + "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])", + "source": "http://hl7.org/fhir/StructureDefinition/DomainResource" + } + ], + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "N/A" + } + ] + }, + { + "id": "Provenance.signature.type.system", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature.type.system", + "short": "Identity of the terminology system", + "definition": "The identification of the code system that defines the meaning of the symbol in the code.", + "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.", + "requirements": "Need to be unambiguous about the source of the definition of the symbol.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.system", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "uri" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.3" + }, + { + "identity": "rim", + "map": "./codeSystem" + }, + { + "identity": "orim", + "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" + } + ] + }, + { + "id": "Provenance.signature.type.version", + "path": "Provenance.signature.type.version", + "short": "Version of the system - if relevant", + "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", + "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.version", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.7" + }, + { + "identity": "rim", + "map": "./codeSystemVersion" + }, + { + "identity": "orim", + "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion" + } + ] + }, + { + "id": "Provenance.signature.type.code", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature.type.code", + "short": "Symbol in syntax defined by the system", + "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to refer to a particular code in the system.", + "min": 1, + "max": "1", + "base": { + "path": "Coding.code", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.1" + }, + { + "identity": "rim", + "map": "./code" + }, + { + "identity": "orim", + "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code" + } + ] + }, + { + "id": "Provenance.signature.type.display", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable", + "valueBoolean": true + } + ], + "path": "Provenance.signature.type.display", + "short": "Representation defined by the system", + "definition": "A representation of the meaning of the code in the system, following the rules of the system.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know the system.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.display", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "string" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "C*E.2 - but note this is not well followed" + }, + { + "identity": "rim", + "map": "CV.displayName" + }, + { + "identity": "orim", + "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName" + } + ] + }, + { + "id": "Provenance.signature.type.userSelected", + "path": "Provenance.signature.type.userSelected", + "short": "If this coding was chosen directly by the user", + "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).", + "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.", + "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.", + "min": 0, + "max": "1", + "base": { + "path": "Coding.userSelected", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "boolean" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "v2", + "map": "Sometimes implied by being first" + }, + { + "identity": "rim", + "map": "CD.codingRationale" + }, + { + "identity": "orim", + "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [ fhir:source \"true\"; fhir:target dt:CDCoding.codingRationale\\#O ]" + } + ] + }, + { + "id": "Provenance.signature.when", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature.when", + "short": "When the signature was created", + "definition": "When the digital signature was signed.", + "comment": "This should agree with the information in the signature.", + "min": 1, + "max": "1", + "base": { + "path": "Signature.when", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "instant" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.signature.who", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature.who", + "short": "Who signed", + "definition": "A reference to an application-usable description of the identity that signed (e.g. the signature used their private key).", + "comment": "This should agree with the information in the signature.", + "min": 1, + "max": "1", + "base": { + "path": "Signature.who", + "min": 1, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson", + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/Device", + "http://hl7.org/fhir/StructureDefinition/Organization" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + } + ] + }, + { + "id": "Provenance.signature.onBehalfOf", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature.onBehalfOf", + "short": "The party represented", + "definition": "A reference to an application-usable description of the identity that is represented by the signature.", + "comment": "The party that can't sign. For example a child.", + "requirements": "used when the signature is on behalf of a non-signer.", + "min": 0, + "max": "1", + "base": { + "path": "Signature.onBehalfOf", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "Reference", + "targetProfile": [ + "http://hl7.org/fhir/StructureDefinition/Practitioner", + "http://hl7.org/fhir/StructureDefinition/PractitionerRole", + "http://hl7.org/fhir/StructureDefinition/RelatedPerson", + "http://hl7.org/fhir/StructureDefinition/Patient", + "http://hl7.org/fhir/StructureDefinition/Device", + "http://hl7.org/fhir/StructureDefinition/Organization" + ] + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + }, + { + "key": "ref-1", + "severity": "error", + "human": "SHALL have a contained resource if a local reference is provided", + "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))", + "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])", + "source": "http://hl7.org/fhir/StructureDefinition/Provenance" + } + ], + "mustSupport": true, + "isSummary": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + }, + { + "identity": "rim", + "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" + } + ] + }, + { + "id": "Provenance.signature.targetFormat", + "path": "Provenance.signature.targetFormat", + "short": "The technical format of the signed resources", + "definition": "A mime type that indicates the technical format of the target resources signed by the signature.", + "comment": "\"xml\", \"json\" and \"ttl\" are allowed, which describe the simple encodings described in the specification (and imply appropriate bundle support). Otherwise, mime types are legal here.", + "min": 0, + "max": "1", + "base": { + "path": "Signature.targetFormat", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "MimeType" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "required", + "description": "The mime type of an attachment. Any valid mime type is allowed.", + "valueSet": "http://hl7.org/fhir/ValueSet/mimetypes|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.signature.sigFormat", + "path": "Provenance.signature.sigFormat", + "short": "The technical format of the signature", + "definition": "A mime type that indicates the technical format of the signature. Important mime types are application/signature+xml for X ML DigSig, application/jose for JWS, and image/* for a graphical image of a signature, etc.", + "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size", + "min": 0, + "max": "1", + "base": { + "path": "Signature.sigFormat", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "code" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "binding": { + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName", + "valueString": "MimeType" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding", + "valueBoolean": true + } + ], + "strength": "required", + "description": "The mime type of an attachment. Any valid mime type is allowed.", + "valueSet": "http://hl7.org/fhir/ValueSet/mimetypes|4.0.1" + }, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + }, + { + "id": "Provenance.signature.data", + "extension": [ + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", + "valueCode": "normative" + }, + { + "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", + "valueCode": "4.0.0" + } + ], + "path": "Provenance.signature.data", + "short": "The actual signature content (XML DigSig. JWS, picture, etc.)", + "definition": "The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.", + "comment": "Where the signature type is an XML DigSig, the signed content is a FHIR Resource(s), the signature is of the XML form of the Resource(s) using XML-Signature (XMLDIG) \"Detached Signature\" form.", + "min": 0, + "max": "1", + "base": { + "path": "Signature.data", + "min": 0, + "max": "1" + }, + "type": [ + { + "code": "base64Binary" + } + ], + "condition": [ + "ele-1" + ], + "constraint": [ + { + "key": "ele-1", + "severity": "error", + "human": "All FHIR elements must have a @value or children", + "expression": "hasValue() or (children().count() > id.count())", + "xpath": "@value|f:*|h:div", + "source": "http://hl7.org/fhir/StructureDefinition/Element" + } + ], + "mustSupport": true, + "mapping": [ + { + "identity": "rim", + "map": "n/a" + } + ] + } + ] + }, + "differential": { + "element": [ + { + "id": "Provenance.entity.what", + "path": "Provenance.entity.what", + "type": [ + { + "code": "Reference", + "targetProfile": [ + "https://www.medizininformatik-initiative.de/fhir/modul-consent/StructureDefinition/mii-pr-consent-documentreference" + ] + } + ] + }, + { + "id": "Provenance.signature.type", + "path": "Provenance.signature.type", + "binding": { + "strength": "required", + "valueSet": "https://www.medizininformatik-initiative.de/fhir/modul-consent/ValueSet/mii-vs-consent-signaturetypes" + } + } + ] + } +} \ No newline at end of file