diff --git a/FHIR-eu-extensions.r4.xml b/FHIR-eu-extensions.xml similarity index 78% rename from FHIR-eu-extensions.r4.xml rename to FHIR-eu-extensions.xml index 75c2239..67b2cd9 100644 --- a/FHIR-eu-extensions.r4.xml +++ b/FHIR-eu-extensions.xml @@ -1,14 +1,13 @@ - + - + - diff --git a/ig.ini b/ig.ini index 01c0a26..51a8980 100644 --- a/ig.ini +++ b/ig.ini @@ -3,7 +3,7 @@ # see comments below for instructions # ig = fsh-generated/resources/ImplementationGuide-hl7.fhir.eu.eu-laboratory.json -ig = fsh-generated/resources/ImplementationGuide-hl7.fhir.eu.extensions.r4.json +ig = fsh-generated/resources/ImplementationGuide-hl7.fhir.eu.extensions.json #template = openhie.fhir.template#current template = #ig-template diff --git a/input/fsh/examples/Examples.fsh b/input/fsh/examples/Examples.fsh new file mode 100644 index 0000000..4f2eca4 --- /dev/null +++ b/input/fsh/examples/Examples.fsh @@ -0,0 +1,24 @@ +Instance: comp-example +InstanceOf: Composition +Title: "Composition: example with InformationRecipient and CompositionBasedOnOrderOrRequisition extensions" +Description: """Composition: example with InformationRecipient and CompositionBasedOnOrderOrRequisition extensions.""" +Usage: #example +* extension[CompositionBasedOnOrderOrRequisition].valueIdentifier + * system = "urn:oid:1.999.999.999" + * value = "document-order-1" +* extension[InformationRecipient].valueReference + * display = "MUDr. Aleš Procházka" +* identifier + * system = "urn:ietf:rfc:3986" +* identifier.value = "urn:uuid:3f69e0a5-2177-4540-baab-7a5d0877428f" +* status = #final +* type = $loinc#11502-2 "Laboratory report" +* subject.display = "Nice Patient" +* date = "2022-10-25T14:30:00+01:00" +* author[+].display = "MUDr. Aleš Procházka" +* title = "Laboratory Report Test" +* confidentiality = #N +* attester[+].mode = #legal +* attester[=].time = "2020-12-27T14:30:00+01:00" +* attester[=].party.display = "Best Laboratory" +* custodian.display = "Best Laboratory" diff --git a/input/fsh/extensions/extensions-lab.fsh b/input/fsh/extensions/extensions-lab.fsh index 3536ea6..92c9c6a 100644 --- a/input/fsh/extensions/extensions-lab.fsh +++ b/input/fsh/extensions/extensions-lab.fsh @@ -4,8 +4,7 @@ Id: composition-basedOn-order-or-requisition Title: "Document Based On Order" Description: "This extension provides a link to the order [(Reference(ServiceRequest)] or requisition [ServiceRequest.requisition (i.e., 'Request.groupIdentifier')] that this report document is based on and fulfills." // publisher, contact, and other metadata here using caret (^) syntax (omitted) -/* * ^context[+].type = #element -* ^context[=].expression = "Composition" */ +* insert SetFmmandStatusRule ( 2, trial-use ) * insert ExtensionContext(Composition) * ^url = "http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition" * value[x] only Reference (ServiceRequest) or Identifier @@ -16,14 +15,13 @@ Id: information-recipient Title: "Information recipient" Description: "This extension applies to the Composition resource and is used to represent an intended recipient of the composition." // publisher, contact, and other metadata here using caret (^) syntax (omitted) -/* * ^context[+].type = #element -* ^context[=].expression = "Composition" */ * insert ExtensionContext(Composition) +* insert SetFmmandStatusRule ( 2, trial-use ) * ^url = "http://hl7.eu/fhir/StructureDefinition/information-recipient" * value[x] only Reference (Practitioner or Device or Patient or RelatedPerson or PractitionerRole or Organization) -Extension: BodyLocationQualifier +/* Extension: BodyLocationQualifier Id: body-location-qualifier Title: "Body Location Qualifier" Description: """Qualifier to refine an body location. These include qualifiers for relative location, directionality, number, and plane, and exclude qualifiers for laterality. @@ -52,4 +50,4 @@ Inspired to the mCode extension.""" * ^url = "http://hl7.eu/fhir/StructureDefinition/laterality-qualifier" * value[x] only CodeableConcept * value[x] from $bodystructure-relative-location (example) -* value[x] 1..1 \ No newline at end of file +* value[x] 1..1 */ \ No newline at end of file diff --git a/input/fsh/rulesSet/rulesSet-common.fsh b/input/fsh/rulesSet/rulesSet-common.fsh new file mode 100644 index 0000000..781dc1d --- /dev/null +++ b/input/fsh/rulesSet/rulesSet-common.fsh @@ -0,0 +1,96 @@ +RuleSet: ExtensionContext(path) +// copied by mCode +* ^context[+].type = #element +* ^context[=].expression = "{path}" + + +RuleSet: SetFmmandStatusRule ( fmm, status ) +* ^extension[http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm].valueInteger = {fmm} +* ^extension[http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status].valueCode = #{status} + + +RuleSet: SetFmmandStatusRuleInstance ( fmm, status ) +// Rule to be used for Instances +* extension[http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm].valueInteger = {fmm} +* extension[http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status].valueCode = #{status} + +RuleSet: SectionComRules (short, def, code) + +// * insert (Health Concern Section, test, http://loinc.org#75310-3) + +* ^extension[0].url = "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name" +* ^extension[0].valueString = "Section" +* ^short = "{short}" +* ^definition = "{def}" +* title 1.. +* code 1.. +* code only http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips +* code = {code} (exactly) +* text 1.. +* text only Narrative +* emptyReason ..0 +* emptyReason ^mustSupport = false + +RuleSet: SectionEntrySliceComRules (short, def) +* entry ^slicing.discriminator[0].type = #type +* entry ^slicing.discriminator[0].path = "resolve()" +* entry ^slicing.ordered = false +* entry ^slicing.rules = #open +* entry ^short = "{short}" +* entry ^definition = "{def}" + +RuleSet: SectionEntrySliceDefRules (name, card, short, def, profiles) +// SectionEntrySliceDefRules (flags, 0.., "Care Team", "Care Team", CareTeamEu) + +* entry contains {name} 0..1 +* entry[{name}] {card} +* entry[{name}] ^short = "{short}" +* entry[{name}] ^definition = "{def}" +* entry[{name}] only Reference({profiles}) + +//-------------------------------------------- +RuleSet: NoSubSectionsRules +* section ..0 +* section ^mustSupport = false + +RuleSet: SectionElementsRules +* code from LabStudyTypesEuVs (preferred) +* text ^short = "Text summary of the section, for human interpretation." +* entry only Reference (ObservationResultsLaboratoryEu ) +// * entry only Reference (ObservationResultsLaboratoryEu or DiagnosticReport) +// * entry ^comment = "The DiagnosticReport referred in the entry SHALL NOT be that representing the whole Laboratory Report" +* entry 1.. +* section ..0 + +RuleSet: SectionCommonRules +* section.title 1.. +* section.code 1.. +* section.code only $CodeableConcept-uv-ips + +RuleSet: SNOMEDCopyrightForVS +* ^copyright = "This value set includes content from SNOMED CT, which is copyright © 2002+ International Health Terminology Standards Development Organisation (IHTSDO), and distributed by agreement between IHTSDO and HL7. Implementer use of SNOMED CT is not covered by this agreement" +* ^experimental = false + +RuleSet: LOINCCopyrightForVS +* ^copyright = "This material contains content from LOINC (http://loinc.org). LOINC is copyright © 1995-2020, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc" +* ^experimental = false + +RuleSet: NPUCopyrightForVS +* ^copyright = "This material contains content from NPU Terminology (http://npu-terminology.org). NPU is copyright International Federation of Clinical Chemistry (IFCC) and International Union of Pure and Applied Chemistry (IUPAC) and is available at no cost under the license at blob:https://www.labterm.dk/0472bc56-3aa1-484d-a377-92a3db82b559." +* ^experimental = false + +/* RuleSet: JCTLMCopyrightForVS +* ^copyright = "This material contains content from JCTLM Database (https://www.jctlmdb.org). The JCTLM Database is copyright Joint Committee for Traceability in Laboratory Medicine (JCTLM)." +* ^experimental = false */ + +RuleSet: NIBSCCopyrightForVS +* ^copyright = "This material contains content from the NIBSC Product list (https://nibsc.org/NIBSC%20Product%20List%20-%20Feb%2024.pdf). The National Institute for Biological Standards and Control part of the UK Medicines and Healthcare products Regulatory Agency (MHRA)." +* ^experimental = true + +RuleSet: ObligationActorAndCode(actor, code) +* ^extension[$obligation][+].extension[code].valueCode = {code} +* ^extension[$obligation][=].extension[actor].valueCanonical = {actor} + +RuleSet: ObligationElement(element) +// Used for profile level obligations. Insert after obligation code and actor +* ^extension[$obligation][=].extension[elementId].valueString = {element} diff --git a/input/fsh/rulesSet/rulesets.fsh b/input/fsh/rulesSet/rulesets.fsh deleted file mode 100644 index 2e98a78..0000000 --- a/input/fsh/rulesSet/rulesets.fsh +++ /dev/null @@ -1,5 +0,0 @@ - -RuleSet: ExtensionContext(path) -// copied by mCode -* ^context[+].type = #element -* ^context[=].expression = "{path}" diff --git a/sushi-config.yaml b/sushi-config.yaml index eb8d2ee..27d62f6 100644 --- a/sushi-config.yaml +++ b/sushi-config.yaml @@ -1,20 +1,20 @@ -id: hl7.fhir.eu.extensions.r4 -canonical: http://hl7.eu/fhir/r4/extensions +id: hl7.fhir.eu.extensions +canonical: http://hl7.eu/fhir/extensions name: Hl7EuExtensions title: HL7 Europe Extensions description: This guide lists the extensions speciifed for the European REALM. status: active # draft | active | retired | unknown -version: 0.1.0-ci # +version: 0.1.0 # fhirVersion: 4.0.1 # https://www.hl7.org/fhir/valueset-FHIR-version.html copyrightYear: 2023+ -releaseLabel: ci-build # ci-build | draft | qa-preview | ballot | trial-use | release | update | normative+trial-use +releaseLabel: trial-use # ci-build | draft | qa-preview | ballot | trial-use | release | update | normative+trial-use # license: CC0-1.0 # https://www.hl7.org/fhir/valueset-spdx-license.html # https://www.hl7.org/fhir/valueset-jurisdiction.html jurisdiction: http://unstats.un.org/unsd/methods/m49/m49.htm#150 "Europe" # urn:iso:std:iso:3166#EU publisher: name: HL7 Europe - # url: http://hl7.eu - url: http://hl7.org/Special/committees/eu + url: http://hl7.eu + # url: http://hl7.org/Special/committees/eu # email: test@example.org copyright: >- Used by permission of HL7 Europe, all rights reserved Creative Commons License @@ -65,8 +65,8 @@ parameters: #see https://confluence.hl7.org/display/FHIR/Implementation+Guide+Pa special-url: - http://hl7.eu/fhir/StructureDefinition/information-recipient - http://hl7.eu/fhir/StructureDefinition/composition-basedOn-order-or-requisition - - http://hl7.eu/fhir/StructureDefinition/body-location-qualifier - - http://hl7.eu/fhir/StructureDefinition/laterality-qualifier +# - http://hl7.eu/fhir/StructureDefinition/body-location-qualifier +# - http://hl7.eu/fhir/StructureDefinition/laterality-qualifier # see https://confluence.hl7.org/display/FHIR/Implementation+Guide+Parameters # path-resource: