FHIR timing in HL7v3 CDA substanceAdministration.effectiveTime

Uit informatiestandaarden
Naar navigatie springen Naar zoeken springen


Voor een overzicht van relevante wiki-pagina's voor Medicatieproces zie Landingspagina_Medicatieproces

Volgens issue MP-347 moet het mogelijk worden om in HL7v3 CDA substanceAdministration.effectiveTime te kiezen voor (de reeds bestaande) SXPR_TS en het FHIR timing datatype. Aanleiding hiervoor is Medicatieproces 9 versie 2.0.0, het gaat om toedieningsschema’s.

1 FHIR versie: R4

Alle versies van FHIR zitten in 1 namespace. Als je nu FHIR versie x aankoppelt, kun je later niet goed naar FHIR versie y, omdat je niet aan een instance kunt zien wat het “is” Gekozen is om gebruik te maken van FHIR 4.0.1. MP 9 2.0.0 is gebaseerd op zibs-2020 en zibs-2020 gaan in FHIR R4. Timing is normatief in FHIR 4.0.1: eventuele wijzigingen zullen backward compatible zijn.

2 Scope

De scope voor deze wijziging is toedieningsschema voor medicatiedosering vanaf MP 9 2.0.0. Alleen CDA substanceAdministration.effectiveTime heeft het nodig. Deze wijziging is daarom zo klein mogelijk: alleen toegepast op substanceAdministration.effectiveTime. Het betreft daarom géén wijziging in coreschemas. De wijziging wordt toegepast in GForge AORTA/trunk/XML/schemas en van daaruit uitgerold naar de (onderhouds)branches van de verschillende informatiestandaarden.

3 Kardinaliteit

FHIR kent navolgende kardinaliteiten:

MedicationRequest.dosageInstruction 0..* Dosage

Dosage.timing 0..1 Timing

CDA substanceAdministration komt overeen met dosageInstruction. substanceAdministration.effectiveTime is 0..* (dat is normaal voor GTS).

effectiveTime met datatype f:Timing heeft voldoende aan kardinaliteit 0..1

4 Uitgangspunt: backwards compatibel

De schemawijziging moet backward compatibel zijn. Dat betekent dat instantiaties die gebruik maken van het bestaande HL7v3-datatype SXCM_TS door het schema goedgekeurd moeten blijven worden.

5 XML schema’s (XSD's)

De wijziging in het HL7v3 CDA schema behelst het maken van een choice, we gaan dus van:

<xs:element name="effectiveTime" type="SXCM_TS" minOccurs="0" maxOccurs="unbounded"/>

naar:

<xs:choice>
    <xs:element name="effectiveTime" type="SXCM_TS" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element ref="f:effectiveTime" minOccurs="0" maxOccurs="1"/>
</xs:choice>

6 Technische toelichting

De gehele FHIR xsd set is aangehouden. Redenen daarvoor zijn:

  • Eenvoudig door te voeren
  • Gemakkelijk om hetzelfde te doen met een nieuwe(re) FHIR versie
  • De FHIR schema’s kent veel onderlinge afhankelijkheden, waardoor het isoleren van een datatype complex is. Verder heeft het weinig toegevoegde waarde, omdat het aantal schema’s niet drastisch zal verminderen.

De stappen die gevolgd zijn:

  1. Geïmporteerd in folder schemas/fhir: FHIR 4.0.1 https://www.hl7.org/fhir/R4/fhir-codegen-xsd.zip.
  2. Nieuw schema in folder schemas: fhir-for-v3.xsd in fhir namespace met daarin xs:element effectiveTime voor reference en een import van fhir/fhir-base.xsd.
  3. HL7v3 xsd aangepast: POCD_MT000040NL_extended.xsd
  • Import toegevoegd:
<xs:import namespace="http://hl7.org/fhir" schemaLocation="fhir-for-v3.xsd"/>
  • Wijziging:
<xs:complexType name="POCD_MT000040.SubstanceAdministration">
     <xs:sequence>
         ....
         <xs:choice minOccurs="0" maxOccurs="1">
            <xs:element name="effectiveTime" type="SXCM_TS" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="f:effectiveTime" minOccurs="0" maxOccurs="1"/>
         </xs:choice>
        ....
     </xs:sequence>
</xs:complexType>

7 Voorbeelden

7.1 1 maal per dag

<substanceAdministration classCode="SBADM" moodCode="RQO">
    <templateId root="2.16.840.1.113883.2.4.3.11.60.20.77.10.9359"/>
    <effectiveTime xsi:type="Timing" xmlns="http://hl7.org/fhir">
        <repeat>
            <frequency value="1"/>
            <period value="1"/>
            <periodUnit value="d"/>
        </repeat>
    </effectiveTime>
    <doseQuantity>
        <center value="1" unit="1">
            <translation value="1" code="245" displayName="stuk" codeSystem="2.16.840.1.113883.2.4.4.1.900.2" codeSystemName="G-Standaard thesaurus basiseenheden"/>
        </center>
    </doseQuantity>
    <consumable xsi:nil="true"/>
</substanceAdministration>

7.2 Pilschema

<substanceAdministration classCode="SBADM" moodCode="RQO">
    <templateId root="2.16.840.1.113883.2.4.3.11.60.20.77.10.9359"/>
    <effectiveTime xsi:type="Timing" xmlns="http://hl7.org/fhir">
        <modifierExtension url="http://nictiz.nl/fhir/StructureDefinition/zib-Medication-RepeatPeriodCyclicalSchedule">
            <valueDuration>
                <value value="28"/>
                <unit value="d"/>
                <system value="http://unitsofmeasure.org"/>
                <code value="d"/>
            </valueDuration>
        </modifierExtension>
        <repeat>
            <boundsDuration>
                <value value="21"/>
                <unit value="dag"/>
                <system value="http://unitsofmeasure.org"/>
                <code value="d"/>
            </boundsDuration>
            <frequency value="1"/>
            <period value="1"/>
            <periodUnit value="d"/>
        </repeat>
    </effectiveTime>
    <doseQuantity>
        <center value="1" unit="1">
            <translation value="1" code="245" displayName="stuk" codeSystem="2.16.840.1.113883.2.4.4.1.900.2" codeSystemName="G-Standaard thesaurus basiseenheden"/>
        </center>
    </doseQuantity>
    <consumable xsi:nil="true"/>
</substanceAdministration>