Skip to content

Commit

Permalink
[#38] Fixed extension invariants in observation.fsh
Browse files Browse the repository at this point in the history
  • Loading branch information
dvribeira committed Nov 24, 2023
1 parent 3481071 commit ef1cf3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions input/fsh/structuredefinition/observation.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@ Severity: #error

Invariant: mtp-ref-conformant
Description: "A changed MedicationStatement SHALL conform to CHEMEDEPRChangedMedicationStatement"
Expression: "extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationstatement-changed').exists() implies extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationstatement-changed').valueIdentifier.value.resolve().conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-medicationstatement-changed')"
Expression: "extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationstatement-changed').exists() implies extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationstatement-changed').extension.where(url='id').value.resolve().conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-medicationstatement-changed')"
Severity: #error

Invariant: pre-ref-conformant
Description: "A changed MedicationRequest SHALL conform to CHEMEDEPRChangedMedicationRequest"
Expression: "extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationrequest-changed').exists() implies extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationrequest-changed').valueIdentifier.value.resolve().conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-medicationrequest-changed')"
Expression: "extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationrequest-changed').exists() implies extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationrequest-changed').extension.where(url='id').value.resolve().conformsTo('https://fhir.cara.ch/StructureDefinition/ch-emed-epr-medicationrequest-changed')"
Severity: #error

Invariant: mtp-same-id
Description: "A changed MedicationStatement SHALL keep the same identifier"
Expression: "extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationstatement-changed').exists() implies extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationstatement-changed').valueIdentifier.value.resolve().identifier.where(system='urn:ietf:rfc:3986').value = extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-treatmentplan').extension.where(url='id').valueIdentifier.value"
Expression: "extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationstatement-changed').exists() implies extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationstatement-changed').extension.where(url='id').value.resolve().identifier.where(system='urn:ietf:rfc:3986').value = extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-treatmentplan').extension.where(url='id').value"
Severity: #error

Invariant: pre-same-id
Description: "A changed MedicationRequest SHALL keep the same identifier"
Expression: "extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationrequest-changed').exists() implies extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationrequest-changed').valueIdentifier.value.resolve().identifier.where(system='urn:ietf:rfc:3986').value = extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-prescription').extension.where(url='id').valueIdentifier.value"
Expression: "extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationrequest-changed').exists() implies extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-medicationrequest-changed').extension.where(url='id').value.resolve().identifier.where(system='urn:ietf:rfc:3986').value = extension.where(url='http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-prescription').extension.where(url='id').value"
Severity: #error

0 comments on commit ef1cf3c

Please sign in to comment.